Some checks failed
Publish to Confluence / confluence (push) Failing after 11m37s
123725 lines
5.2 MiB
123725 lines
5.2 MiB
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.impl.ConsoleViewImpl
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.ToggleAction
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.intellij.execution.impl.ConsoleViewImpl;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.ToggleAction;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.Objects;
|
||
import javax.swing.Icon;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends ToggleAction {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
static final /* synthetic */ boolean var_boolean_a;
|
||
|
||
public a() {
|
||
}
|
||
|
||
public a(@Nullable String string) {
|
||
super(string);
|
||
}
|
||
|
||
public a(@Nullable String string, @Nullable String string2, @Nullable Icon icon, Project project) {
|
||
super(string, string2, icon);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public boolean isSelected(@NotNull AnActionEvent anActionEvent) {
|
||
return Boolean.TRUE.equals(this.cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a(anActionEvent).getPrettyFormat());
|
||
}
|
||
|
||
private MybatisCodeHelperLogSettingState cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a(@NotNull AnActionEvent anActionEvent) {
|
||
return (MybatisCodeHelperLogSettingState)ServiceManager.getService((Project)Objects.requireNonNull(this.a()), MybatisCodeHelperLogSettingState.class);
|
||
}
|
||
|
||
public void setSelected(@NotNull AnActionEvent anActionEvent, boolean bl) {
|
||
this.void_a(anActionEvent);
|
||
}
|
||
|
||
private void void_a(AnActionEvent anActionEvent) {
|
||
Project project = anActionEvent.getProject();
|
||
if (!var_boolean_a && project == null) {
|
||
throw new AssertionError();
|
||
}
|
||
Boolean bl = this.cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a(anActionEvent).getPrettyFormat();
|
||
ConsoleViewImpl consoleViewImpl = cn.com.pism.batslog.f.a.c.get(project);
|
||
String string = consoleViewImpl.getText();
|
||
this.cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a(anActionEvent).setPrettyFormat(bl == false);
|
||
cn.com.pism.batslog.f.a.var_com_intellij_ui_components_OnOffButton_a.setSelected(bl == false);
|
||
}
|
||
|
||
private void a(String string, ConsoleViewImpl consoleViewImpl) {
|
||
if (StringUtils.isNotBlank((CharSequence)string)) {
|
||
String[] stringArray;
|
||
for (String string2 : stringArray = string.split("\n")) {
|
||
if (!"-- --------------------------------------\n".equals(string2)) continue;
|
||
consoleViewImpl.print(string2, ConsoleViewContentType.ERROR_OUTPUT);
|
||
}
|
||
}
|
||
}
|
||
|
||
public Project a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
static {
|
||
var_boolean_a = !a.class.desiredAssertionStatus();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class b
|
||
extends com.ccnode.codegenerator.a.b {
|
||
public b() {
|
||
}
|
||
|
||
public b(@Nullable String string, @Nullable String string2, @Nullable Icon icon) {
|
||
super(string, string2, icon);
|
||
}
|
||
|
||
public void actionPerformed(AnActionEvent anActionEvent) {
|
||
String string = a.a(anActionEvent);
|
||
a.a(anActionEvent, string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* org.apache.log4j.Logger
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import cn.com.pism.batslog.f.g;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import javax.swing.Icon;
|
||
import org.apache.log4j.Logger;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends b {
|
||
private static final Logger a = Logger.getLogger(c.class);
|
||
|
||
public c() {
|
||
}
|
||
|
||
public c(@Nullable String string, @Nullable String string2, @Nullable Icon icon) {
|
||
super(string, string2, icon);
|
||
}
|
||
|
||
public void actionPerformed(AnActionEvent anActionEvent) {
|
||
String string = cn.com.pism.batslog.f.a.a(anActionEvent);
|
||
g.a(string, anActionEvent.getProject());
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import cn.com.pism.batslog.f.g;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class d
|
||
extends b {
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
String string3 = a.a(anActionEvent);
|
||
g.a(string3, anActionEvent.getProject(), (String string, String string2) -> {
|
||
BslErrorMod bslErrorMod = new BslErrorMod();
|
||
bslErrorMod.setErrorMsg("");
|
||
bslErrorMod.setParams(string2);
|
||
bslErrorMod.setSql(string);
|
||
bslErrorMod.setTime("");
|
||
new cn.com.pism.batslog.e.d(anActionEvent.getProject(), bslErrorMod);
|
||
});
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.ActionUpdateThread
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.Presentation
|
||
* com.intellij.openapi.actionSystem.ex.CustomComponentAction
|
||
* com.intellij.openapi.project.DumbAwareAction
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.Presentation;
|
||
import com.intellij.openapi.actionSystem.ex.CustomComponentAction;
|
||
import com.intellij.openapi.project.DumbAwareAction;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class e
|
||
extends DumbAwareAction
|
||
implements CustomComponentAction {
|
||
private final String a;
|
||
|
||
public e(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
@NotNull
|
||
public JComponent createCustomComponent(@NotNull Presentation presentation, @NotNull String string) {
|
||
return new JLabel(this.a);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
}
|
||
|
||
@NotNull
|
||
public ActionUpdateThread getActionUpdateThread() {
|
||
return ActionUpdateThread.BGT;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.Presentation
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.a;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.Presentation;
|
||
import com.intellij.openapi.project.Project;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class f
|
||
extends b {
|
||
public f() {
|
||
super(a.a("start", new Object[0]), a.a("startSqlListener", new Object[0]), AllIcons.Actions.Execute);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
Project project = anActionEvent.getProject();
|
||
cn.com.pism.batslog.f.a.d.remove(project);
|
||
if (project != null) {
|
||
Boolean bl = cn.com.pism.batslog.f.a.a(project);
|
||
cn.com.pism.batslog.f.a.var_java_util_Map_com_intellij_openapi_project_Project,_java_lang_Boolean__b.put(project, bl == false);
|
||
}
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
super.update(anActionEvent);
|
||
Project project = anActionEvent.getProject();
|
||
if (project != null) {
|
||
Boolean bl = cn.com.pism.batslog.f.a.a(project);
|
||
Icon icon = bl != false ? AllIcons.Actions.Suspend : AllIcons.Actions.Execute;
|
||
String string = bl != false ? a.a("stop", new Object[0]) : a.a("start", new Object[0]);
|
||
String string2 = bl != false ? a.a("stopSqlListener", new Object[0]) : a.a("startSqlListener", new Object[0]);
|
||
Presentation presentation = anActionEvent.getPresentation();
|
||
presentation.setIcon(icon);
|
||
presentation.setDescription(string2);
|
||
presentation.setText(string);
|
||
presentation.setEnabledAndVisible(true);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.e.f;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class g
|
||
extends b {
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
f.a(anActionEvent.getProject());
|
||
}
|
||
|
||
public g(@Nullable String string, @Nullable String string2, @Nullable Icon icon) {
|
||
super(string, string2, icon);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.Presentation
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.Presentation;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JTextField;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class h
|
||
extends b {
|
||
private final String var_java_lang_String_a;
|
||
private final JTextField var_javax_swing_JTextField_a;
|
||
|
||
public h(Icon icon, String string, JTextField jTextField) {
|
||
super("", "", icon);
|
||
this.var_java_lang_String_a = string;
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
this.var_javax_swing_JTextField_a.setText(this.var_java_lang_String_a);
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
super.update(anActionEvent);
|
||
Presentation presentation = anActionEvent.getPresentation();
|
||
presentation.setIcon(AllIcons.Actions.Rollback);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.startup.StartupActivity
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.slf4j.Logger
|
||
* org.slf4j.LoggerFactory
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.e.e;
|
||
import cn.com.pism.batslog.f.a;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.startup.StartupActivity;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.slf4j.Logger;
|
||
import org.slf4j.LoggerFactory;
|
||
|
||
public class i
|
||
implements StartupActivity {
|
||
private static final Logger a = LoggerFactory.getLogger(i.class);
|
||
|
||
public void runActivity(@NotNull Project project) {
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
if (Boolean.TRUE.equals(mybatisCodeHelperLogSettingState.getStartWithProject())) {
|
||
cn.com.pism.batslog.f.a.var_java_util_Map_com_intellij_openapi_project_Project,_java_lang_Boolean__b.put(project, Boolean.TRUE);
|
||
e e2 = cn.com.pism.batslog.f.a.g.get(project);
|
||
if (e2 == null) {
|
||
cn.com.pism.batslog.f.a.g.put(project, new e(project));
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.Presentation
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.a;
|
||
|
||
import cn.com.pism.batslog.a;
|
||
import cn.com.pism.batslog.e.g;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.Presentation;
|
||
import com.intellij.openapi.project.Project;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class j
|
||
extends b {
|
||
private Runnable a;
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
Project project = anActionEvent.getProject();
|
||
cn.com.pism.batslog.f.a.d.remove(project);
|
||
if (project != null) {
|
||
Boolean bl = cn.com.pism.batslog.f.a.a(project);
|
||
cn.com.pism.batslog.f.a.var_java_util_Map_com_intellij_openapi_project_Project,_java_lang_Boolean__b.put(project, bl == false);
|
||
g g2 = (g)cn.com.pism.batslog.f.a.c.get(project);
|
||
String string = bl != false ? cn.com.pism.batslog.a.a("SqlListenerHasStop", new Object[0]) : cn.com.pism.batslog.a.a("SqlListenerHasStarted", new Object[0]);
|
||
g2.print(string, ConsoleViewContentType.LOG_DEBUG_OUTPUT);
|
||
g2.a(g2.com_intellij_openapi_actionSystem_ActionToolbar_a().getActions());
|
||
this.a.run();
|
||
}
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
super.update(anActionEvent);
|
||
Project project = anActionEvent.getProject();
|
||
if (project != null) {
|
||
Boolean bl = cn.com.pism.batslog.f.a.a(project);
|
||
Icon icon = bl != false ? AllIcons.Actions.Suspend : AllIcons.Actions.Execute;
|
||
String string = bl != false ? cn.com.pism.batslog.a.a("stop", new Object[0]) : cn.com.pism.batslog.a.a("start", new Object[0]);
|
||
String string2 = bl != false ? cn.com.pism.batslog.a.a("stopSqlListener", new Object[0]) : cn.com.pism.batslog.a.a("startSqlListener", new Object[0]);
|
||
Presentation presentation = anActionEvent.getPresentation();
|
||
presentation.setIcon(icon);
|
||
presentation.setDescription(string2);
|
||
presentation.setText(string);
|
||
}
|
||
}
|
||
|
||
public j(@Nullable String string, @Nullable String string2, @Nullable Icon icon, Runnable runnable) {
|
||
super(string, string2, icon);
|
||
this.a = runnable;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.AbstractBundle
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.PropertyKey
|
||
*/
|
||
package cn.com.pism.batslog;
|
||
|
||
import com.intellij.AbstractBundle;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.PropertyKey;
|
||
|
||
public class a
|
||
extends AbstractBundle {
|
||
private static final String var_java_lang_String_a = "text.BatsLogBundle";
|
||
private static final a var_cn_com_pism_batslog_a_a;
|
||
|
||
public static String a(@NotNull @PropertyKey(resourceBundle="text.BatsLogBundle") @NotNull @PropertyKey(resourceBundle="text.BatsLogBundle") String string, Object ... objectArray) {
|
||
return var_cn_com_pism_batslog_a_a.getMessage(string, objectArray);
|
||
}
|
||
|
||
private a() {
|
||
super(var_java_lang_String_a);
|
||
}
|
||
|
||
static {
|
||
var_cn_com_pism_batslog_a_a = new a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ui.JBColor
|
||
*/
|
||
package cn.com.pism.batslog.b;
|
||
|
||
import com.intellij.ui.JBColor;
|
||
import java.awt.Color;
|
||
|
||
public class a {
|
||
public static final String var_java_lang_String_a = "\n ____ _ _ \n | _ \\ | | | | \n | |_) | __ _| |_ ___| | ___ __ _ \n | _ < / _` | __/ __| | / _ \\ / _` |\n | |_) | (_| | |_\\__ \\ |___| (_) | (_| |\n |____/ \\__,_|\\__|___/______\\___/ \\__, |\n __/ |\n |___/ \n";
|
||
public static final String b = "-- --------------------------------------\n";
|
||
public static final String c = "[";
|
||
public static final Color var_java_awt_Color_a;
|
||
public static final String d = "Preparing:";
|
||
public static final String e = "Parameters:";
|
||
public static final String f = "yyyy-MM-dd HH:mm:ss";
|
||
public static final String g = "cn.com.pism.batslog";
|
||
public static final String h = "BatsLog";
|
||
public static final String i = "AUTO";
|
||
|
||
static {
|
||
var_java_awt_Color_a = new JBColor(new Color(204, 120, 50), new Color(204, 120, 50));
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.b;
|
||
|
||
import java.util.Arrays;
|
||
import java.util.HashSet;
|
||
import java.util.Set;
|
||
|
||
public class b {
|
||
public static final Set<String> a = new HashSet<String>();
|
||
|
||
static {
|
||
a.addAll(Arrays.asList(cn.com.pism.batslog.b.b$a.a));
|
||
}
|
||
|
||
private static class a {
|
||
public static final String[] a = new String[]{"accessible", "compact", "end", "identified", "match", "order", "replicate_ignore_table", "sqlwarning", "union", "add", "completion", "ends", "if", "maxvalue", "out", "replicate_rewrite_db", "sql_after_mts_gaps", "unique", "after", "compressed", "engine", "ignore", "max_connections_per_hour", "outer", "replicate_wild_do_table", "sql_before_gtids", "unknown", "against", "compression", "engines", "import", "max_queries_per_hour", "outfile", "replicate_wild_ignore_table", "sql_big_result", "unlock", "aggregate", "concurrent", "enum", "in", "max_rows", "pack_keys", "replication", "sql_buffer_result", "unsigned", "all", "condition", "error", "index", "max_size", "page", "require", "sql_cache", "until", "alter", "connection", "errors", "indexes", "max_statement_time", "parser", "reset", "sql_calc_found_rows", "update", "always", "consistent", "escape", "infile", "max_updates_per_hour", "parse_gcol_expr", "resignal", "sql_no_cache", "upgrade", "analyse", "constraint", "escaped", "inner", "max_user_connections", "partial", "restore", "sql_small_result", "usage", "analyze", "contains", "event", "inout", "medium", "partition", "restrict", "ssl", "use", "and", "context", "events", "insensitive", "mediumblob", "partitioning", "resume", "stacked", "user", "any", "continue", "every", "insert", "mediumint", "partitions", "return", "starting", "use_frm", "as", "convert", "exchange", "install", "mediumtext", "password", "returned_sqlstate", "starts", "using", "asc", "cpu", "execute", "int", "merge", "phase", "returns", "stats_auto_recalc", "utc_date", "ascii", "create", "exists", "int1", "microsecond", "plugin", "reverse", "stats_persistent", "utc_time", "asensitive", "cross", "exit", "int2", "middleint", "plugins", "revoke", "stats_sample_pages", "utc_timestamp", "at", "cube", "expansion", "int3", "migrate", "plugin_dir", "right", "stop", "validation", "auto_increment", "current", "explain", "int4", "minute", "polygon", "rlike", "storage", "values", "avg", "current_date", "export", "int8", "minute_microsecond", "precedes", "rollback", "stored", "varbinary", "avg_row_length", "current_time", "extended", "integer", "minute_second", "precision", "rollup", "straight_join", "varchar", "backup", "current_timestamp", "extent_size", "interval", "minvalue", "prepare", "rotate", "string", "varcharacter", "before", "current_user", "false", "into", "mod", "preserve", "routine", "subclass_origin", "variables", "begin", "cursor", "fast", "io", "modifies", "prev", "row", "subpartition", "varying", "between", "config.form.basic.label.databaseType", "faults", "io_after_gtids", "modify", "primary", "rows", "subpartitions", "view", "bigint", "databases", "fetch", "io_before_gtids", "month", "privileges", "row_count", "super", "virtual", "binary", "date", "fields", "io_thread", "multilinestring", "procedure", "row_format", "suspend", "wait", "binlog", "datetime", "filter", "ipc", "multipoint", "processlist", "rtree", "swaps", "warnings", "bit", "day", "first", "is", "multipolygon", "purge", "savepoint", "switches", "week", "blob", "deallocate", "fixed", "isolation", "mutex", "quarter", "schedule", "table", "weight_string", "block", "dec", "float", "issuer", "mysql_errno", "query", "schema", "tables", "when", "bool", "decimal", "float4", "iterate", "national", "range", "schemas", "tablespace", "where", "boolean", "declare", "float8", "join", "natural", "read", "second", "temporary", "while", "both", "default", "flush", "json", "nchar", "reads", "second_microsecond", "temptable", "with", "btree", "definer", "for", "key", "ndb", "read_only", "security", "terminated", "without", "by", "delayed", "force", "keys", "ndbcluster", "read_write", "select", "text", "work", "byte", "delete", "foreign", "kill", "never", "real", "sensitive", "than", "wrapper", "cache", "desc", "format", "leading", "new", "rebuild", "separator", "then", "write", "call", "describe", "found", "leave", "next", "recover", "serial", "time", "x509", "cascade", "deterministic", "from", "leaves", "no", "redofile", "serializable", "timestamp", "xa", "cascaded", "diagnostics", "full", "left", "nodegroup", "redo_buffer_size", "server", "timestampadd", "xml", "case", "directory", "fulltext", "less", "nonblocking", "redundant", "session", "timestampdiff", "xor", "chain", "disable", "function", "like", "none", "references", "set", "tinyblob", "year_month", "change", "discard", "general", "limit", "not", "regexp", "share", "tinyint", "zerofill", "changed", "disk", "generated", "linear", "no_wait", "relay", "show", "tinytext", "channel", "distinct", "geometry", "lines", "no_write_to_binlog", "relaylog", "shutdown", "to", "char", "distinctrow", "geometrycollection", "linestring", "null", "relay_log_file", "signal", "trailing", "character", "div", "get", "list", "number", "relay_log_pos", "signed", "transaction", "charset", "do", "grant", "load", "numeric", "relay_thread", "slave", "trigger", "check", "double", "grants", "local", "nvarchar", "release", "slow", "triggers", "checksum", "drop", "group", "localtime", "offset", "reload", "smallint", "true", "cipher", "dual", "group_replication", "localtimestamp", "batslog.action.onOffButton.on", "remove", "snapshot", "truncate", "close", "dumpfile", "handler", "lock", "one", "rename", "some", "type", "coalesce", "duplicate", "having", "locks", "only", "reorganize", "soname", "types", "collate", "dynamic", "high_priority", "logfile", "open", "repair", "sounds", "uncommitted", "collation", "each", "host", "logs", "optimize", "repeat", "source", "undefined", "column", "else", "hosts", "long", "optimizer_costs", "repeatable", "spatial", "undo", "columns", "elseif", "hour", "longblob", "option", "replace", "specific", "undofile", "comment", "config.form.console.colorConfigForm.table.label.enable", "hour_microsecond", "longtext", "optionally", "replicate_do_db", "sql", "undo_buffer_size", "commit", "enclosed", "hour_minute", "loop", "options", "replicate_do_table", "sqlexception", "unicode", "committed", "encryption", "hour_second", "low_priority", "or", "replicate_ignore_db", "sqlstate", "uninstall"};
|
||
|
||
private a() {
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.alibaba.fastjson.JSONObject
|
||
* com.intellij.util.xmlb.Converter
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.c;
|
||
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
import com.alibaba.fastjson.JSONObject;
|
||
import com.intellij.util.xmlb.Converter;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends Converter<RgbColor> {
|
||
@Nullable
|
||
public RgbColor a(@NotNull String string) {
|
||
return (RgbColor)JSONObject.parseObject((String)string, RgbColor.class);
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@NotNull RgbColor rgbColor) {
|
||
return JSONObject.toJSONString((Object)rgbColor);
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ String toString(@NotNull Object object) {
|
||
return this.a((RgbColor)object);
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@NotNull String string) {
|
||
return this.a(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.alibaba.fastjson.JSON
|
||
* com.intellij.util.xmlb.Converter
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.c;
|
||
|
||
import cn.com.pism.batslog.model.ConsoleColorConfig;
|
||
import com.alibaba.fastjson.JSON;
|
||
import com.intellij.util.xmlb.Converter;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class b
|
||
extends Converter<List<ConsoleColorConfig>> {
|
||
@Nullable
|
||
public List<ConsoleColorConfig> a(@NotNull String string) {
|
||
return JSON.parseArray((String)string, ConsoleColorConfig.class);
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@NotNull List<ConsoleColorConfig> list) {
|
||
return JSON.toJSONString(list);
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ String toString(@NotNull Object object) {
|
||
return this.a((List)object);
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@NotNull String string) {
|
||
return this.a(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xmlb.Converter
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.c;
|
||
|
||
import cn.com.pism.batslog.enums.DbType;
|
||
import com.intellij.util.xmlb.Converter;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends Converter<DbType> {
|
||
@Nullable
|
||
public DbType a(@NotNull String string) {
|
||
return DbType.getByName(string);
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@NotNull DbType dbType) {
|
||
return dbType.getName();
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ String toString(@NotNull Object object) {
|
||
return this.a((DbType)((Object)object));
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@NotNull String string) {
|
||
return this.a(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.alibaba.druid.util.JdbcConstants
|
||
* com.intellij.icons.AllIcons$Providers
|
||
*/
|
||
package cn.com.pism.batslog.enums;
|
||
|
||
import com.alibaba.druid.util.JdbcConstants;
|
||
import com.intellij.icons.AllIcons;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
import java.util.Optional;
|
||
import javax.swing.Icon;
|
||
|
||
public enum DbType {
|
||
OTHER("generic sql", "other", null),
|
||
MYSQL("mysql", JdbcConstants.MYSQL.name(), AllIcons.Providers.Mysql),
|
||
HSQL("hsql", JdbcConstants.HSQL.name(), AllIcons.Providers.Hsqldb),
|
||
DB2("db2", JdbcConstants.DB2.name(), AllIcons.Providers.DB2),
|
||
POSTGRESQL("postgresql", JdbcConstants.POSTGRESQL.name(), AllIcons.Providers.Postgresql),
|
||
SYBASE("sybase", JdbcConstants.SYBASE.name(), AllIcons.Providers.Sybase),
|
||
SQL_SERVER("SqlServer", JdbcConstants.SQL_SERVER.name(), AllIcons.Providers.SqlServer),
|
||
ORACLE("oracle", JdbcConstants.ORACLE.name(), AllIcons.Providers.Oracle),
|
||
ALI_ORACLE("AliOracle", JdbcConstants.ALI_ORACLE.name(), null),
|
||
MARIADB("mariadb", "mariadb", AllIcons.Providers.Mariadb),
|
||
DERBY("derby", JdbcConstants.DERBY.name(), AllIcons.Providers.ApacheDerby),
|
||
HBASE("hbase", "hbase", null),
|
||
HIVE("hive", JdbcConstants.HIVE.name(), AllIcons.Providers.Hive),
|
||
H2("h2", JdbcConstants.H2.name(), AllIcons.Providers.H2),
|
||
SQLITE("sqlite", "sqlite", AllIcons.Providers.Sqlite),
|
||
POLARDB("polardb", JdbcConstants.POLARDB.name(), null);
|
||
|
||
private String name;
|
||
private String type;
|
||
private Icon icon;
|
||
|
||
private DbType(String string2, String string3, Icon icon) {
|
||
this.name = string2;
|
||
this.type = string3;
|
||
this.icon = icon;
|
||
}
|
||
|
||
public static DbType getByName(String string) {
|
||
DbType[] dbTypeArray = DbType.values();
|
||
Optional<DbType> optional = Arrays.stream(dbTypeArray).filter(dbType -> string.equals(dbType.getName())).findFirst();
|
||
return optional.orElse(OTHER);
|
||
}
|
||
|
||
public static List<DbType> getRadioButtons() {
|
||
DbType[] dbTypeArray = DbType.values();
|
||
return Arrays.asList((DbType[])dbTypeArray.clone());
|
||
}
|
||
|
||
public String getName() {
|
||
return this.name;
|
||
}
|
||
|
||
public void setName(String string) {
|
||
this.name = string;
|
||
}
|
||
|
||
public String getType() {
|
||
return this.type;
|
||
}
|
||
|
||
public void setType(String string) {
|
||
this.type = string;
|
||
}
|
||
|
||
public Icon getIcon() {
|
||
return this.icon;
|
||
}
|
||
|
||
public void setIcon(Icon icon) {
|
||
this.icon = icon;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.model;
|
||
|
||
public class BslErrorMod {
|
||
private String sql;
|
||
private String params;
|
||
private String time;
|
||
private String errorMsg;
|
||
|
||
public BslErrorMod(String string, String string2, String string3, String string4) {
|
||
this.sql = string;
|
||
this.params = string2;
|
||
this.time = string3;
|
||
this.errorMsg = string4;
|
||
}
|
||
|
||
public BslErrorMod() {
|
||
}
|
||
|
||
public Object[] toArray() {
|
||
return new Object[]{this.sql, this.params, this.time, this.errorMsg};
|
||
}
|
||
|
||
public BslErrorMod toMod(Object[] objectArray) {
|
||
return new BslErrorMod((String)objectArray[0], (String)objectArray[1], (String)objectArray[2], (String)objectArray[3]);
|
||
}
|
||
|
||
public String getSql() {
|
||
return this.sql;
|
||
}
|
||
|
||
public String getParams() {
|
||
return this.params;
|
||
}
|
||
|
||
public String getTime() {
|
||
return this.time;
|
||
}
|
||
|
||
public String getErrorMsg() {
|
||
return this.errorMsg;
|
||
}
|
||
|
||
public void setSql(String string) {
|
||
this.sql = string;
|
||
}
|
||
|
||
public void setParams(String string) {
|
||
this.params = string;
|
||
}
|
||
|
||
public void setTime(String string) {
|
||
this.time = string;
|
||
}
|
||
|
||
public void setErrorMsg(String string) {
|
||
this.errorMsg = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof BslErrorMod)) {
|
||
return false;
|
||
}
|
||
BslErrorMod bslErrorMod = (BslErrorMod)object;
|
||
if (!bslErrorMod.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getSql();
|
||
String string2 = bslErrorMod.getSql();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
String string3 = this.getParams();
|
||
String string4 = bslErrorMod.getParams();
|
||
if (string3 == null ? string4 != null : !string3.equals(string4)) {
|
||
return false;
|
||
}
|
||
String string5 = this.getTime();
|
||
String string6 = bslErrorMod.getTime();
|
||
if (string5 == null ? string6 != null : !string5.equals(string6)) {
|
||
return false;
|
||
}
|
||
String string7 = this.getErrorMsg();
|
||
String string8 = bslErrorMod.getErrorMsg();
|
||
return !(string7 == null ? string8 != null : !string7.equals(string8));
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof BslErrorMod;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getSql();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
String string2 = this.getParams();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
String string3 = this.getTime();
|
||
n3 = n3 * 59 + (string3 == null ? 43 : string3.hashCode());
|
||
String string4 = this.getErrorMsg();
|
||
n3 = n3 * 59 + (string4 == null ? 43 : string4.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "BslErrorMod(sql=" + this.getSql() + ", params=" + this.getParams() + ", time=" + this.getTime() + ", errorMsg=" + this.getErrorMsg() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.model;
|
||
|
||
import cn.com.pism.batslog.model.EnabledRgbColor;
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
|
||
public class ConsoleColorConfig {
|
||
private String id;
|
||
private int sort;
|
||
private String keyWord;
|
||
private RgbColor backgroundColor;
|
||
private boolean enableBgColor = true;
|
||
private RgbColor foregroundColor;
|
||
private boolean enabledFgColor = true;
|
||
private boolean enabled;
|
||
|
||
public ConsoleColorConfig(String string, int n2, String string2, RgbColor rgbColor, boolean bl, RgbColor rgbColor2, boolean bl2, boolean bl3) {
|
||
this.id = string;
|
||
this.sort = n2;
|
||
this.keyWord = string2;
|
||
this.backgroundColor = rgbColor;
|
||
this.enableBgColor = bl;
|
||
this.foregroundColor = rgbColor2;
|
||
this.enabledFgColor = bl2;
|
||
this.enabled = bl3;
|
||
}
|
||
|
||
public ConsoleColorConfig() {
|
||
}
|
||
|
||
public Object[] toArray() {
|
||
return new Object[]{this.id, this.sort, this.keyWord, new EnabledRgbColor(this.enableBgColor, this.backgroundColor), new EnabledRgbColor(this.enabledFgColor, this.foregroundColor), this.enabled};
|
||
}
|
||
|
||
public ConsoleColorConfig toConfig(Object[] objectArray) {
|
||
ConsoleColorConfig consoleColorConfig = new ConsoleColorConfig();
|
||
consoleColorConfig.setId((String)objectArray[0]);
|
||
consoleColorConfig.setSort((Integer)objectArray[1]);
|
||
consoleColorConfig.setKeyWord((String)objectArray[2]);
|
||
EnabledRgbColor enabledRgbColor = (EnabledRgbColor)objectArray[3];
|
||
consoleColorConfig.setBackgroundColor(enabledRgbColor.getRgbColor());
|
||
consoleColorConfig.setEnableBgColor(enabledRgbColor.isEnabledColor());
|
||
EnabledRgbColor enabledRgbColor2 = (EnabledRgbColor)objectArray[4];
|
||
consoleColorConfig.setForegroundColor(enabledRgbColor2.getRgbColor());
|
||
consoleColorConfig.setEnabledFgColor(enabledRgbColor2.isEnabledColor());
|
||
consoleColorConfig.setEnabled((Boolean)objectArray[5]);
|
||
return consoleColorConfig;
|
||
}
|
||
|
||
public String getId() {
|
||
return this.id;
|
||
}
|
||
|
||
public int getSort() {
|
||
return this.sort;
|
||
}
|
||
|
||
public String getKeyWord() {
|
||
return this.keyWord;
|
||
}
|
||
|
||
public RgbColor getBackgroundColor() {
|
||
return this.backgroundColor;
|
||
}
|
||
|
||
public boolean isEnableBgColor() {
|
||
return this.enableBgColor;
|
||
}
|
||
|
||
public RgbColor getForegroundColor() {
|
||
return this.foregroundColor;
|
||
}
|
||
|
||
public boolean isEnabledFgColor() {
|
||
return this.enabledFgColor;
|
||
}
|
||
|
||
public boolean isEnabled() {
|
||
return this.enabled;
|
||
}
|
||
|
||
public void setId(String string) {
|
||
this.id = string;
|
||
}
|
||
|
||
public void setSort(int n2) {
|
||
this.sort = n2;
|
||
}
|
||
|
||
public void setKeyWord(String string) {
|
||
this.keyWord = string;
|
||
}
|
||
|
||
public void setBackgroundColor(RgbColor rgbColor) {
|
||
this.backgroundColor = rgbColor;
|
||
}
|
||
|
||
public void setEnableBgColor(boolean bl) {
|
||
this.enableBgColor = bl;
|
||
}
|
||
|
||
public void setForegroundColor(RgbColor rgbColor) {
|
||
this.foregroundColor = rgbColor;
|
||
}
|
||
|
||
public void setEnabledFgColor(boolean bl) {
|
||
this.enabledFgColor = bl;
|
||
}
|
||
|
||
public void setEnabled(boolean bl) {
|
||
this.enabled = bl;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof ConsoleColorConfig)) {
|
||
return false;
|
||
}
|
||
ConsoleColorConfig consoleColorConfig = (ConsoleColorConfig)object;
|
||
if (!consoleColorConfig.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getId();
|
||
String string2 = consoleColorConfig.getId();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
if (this.getSort() != consoleColorConfig.getSort()) {
|
||
return false;
|
||
}
|
||
String string3 = this.getKeyWord();
|
||
String string4 = consoleColorConfig.getKeyWord();
|
||
if (string3 == null ? string4 != null : !string3.equals(string4)) {
|
||
return false;
|
||
}
|
||
RgbColor rgbColor = this.getBackgroundColor();
|
||
RgbColor rgbColor2 = consoleColorConfig.getBackgroundColor();
|
||
if (rgbColor == null ? rgbColor2 != null : !((Object)rgbColor).equals(rgbColor2)) {
|
||
return false;
|
||
}
|
||
if (this.isEnableBgColor() != consoleColorConfig.isEnableBgColor()) {
|
||
return false;
|
||
}
|
||
RgbColor rgbColor3 = this.getForegroundColor();
|
||
RgbColor rgbColor4 = consoleColorConfig.getForegroundColor();
|
||
if (rgbColor3 == null ? rgbColor4 != null : !((Object)rgbColor3).equals(rgbColor4)) {
|
||
return false;
|
||
}
|
||
if (this.isEnabledFgColor() != consoleColorConfig.isEnabledFgColor()) {
|
||
return false;
|
||
}
|
||
return this.isEnabled() == consoleColorConfig.isEnabled();
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof ConsoleColorConfig;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getId();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
n3 = n3 * 59 + this.getSort();
|
||
String string2 = this.getKeyWord();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
RgbColor rgbColor = this.getBackgroundColor();
|
||
n3 = n3 * 59 + (rgbColor == null ? 43 : ((Object)rgbColor).hashCode());
|
||
n3 = n3 * 59 + (this.isEnableBgColor() ? 79 : 97);
|
||
RgbColor rgbColor2 = this.getForegroundColor();
|
||
n3 = n3 * 59 + (rgbColor2 == null ? 43 : ((Object)rgbColor2).hashCode());
|
||
n3 = n3 * 59 + (this.isEnabledFgColor() ? 79 : 97);
|
||
n3 = n3 * 59 + (this.isEnabled() ? 79 : 97);
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "ConsoleColorConfig(id=" + this.getId() + ", sort=" + this.getSort() + ", keyWord=" + this.getKeyWord() + ", backgroundColor=" + this.getBackgroundColor() + ", enableBgColor=" + this.isEnableBgColor() + ", foregroundColor=" + this.getForegroundColor() + ", enabledFgColor=" + this.isEnabledFgColor() + ", enabled=" + this.isEnabled() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.model;
|
||
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
|
||
public class EnabledRgbColor {
|
||
private boolean enabledColor;
|
||
private RgbColor rgbColor;
|
||
|
||
public EnabledRgbColor(boolean bl, RgbColor rgbColor) {
|
||
this.enabledColor = bl;
|
||
this.rgbColor = rgbColor;
|
||
}
|
||
|
||
public boolean isEnabledColor() {
|
||
return this.enabledColor;
|
||
}
|
||
|
||
public RgbColor getRgbColor() {
|
||
return this.rgbColor;
|
||
}
|
||
|
||
public void setEnabledColor(boolean bl) {
|
||
this.enabledColor = bl;
|
||
}
|
||
|
||
public void setRgbColor(RgbColor rgbColor) {
|
||
this.rgbColor = rgbColor;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof EnabledRgbColor)) {
|
||
return false;
|
||
}
|
||
EnabledRgbColor enabledRgbColor = (EnabledRgbColor)object;
|
||
if (!enabledRgbColor.canEqual(this)) {
|
||
return false;
|
||
}
|
||
if (this.isEnabledColor() != enabledRgbColor.isEnabledColor()) {
|
||
return false;
|
||
}
|
||
RgbColor rgbColor = this.getRgbColor();
|
||
RgbColor rgbColor2 = enabledRgbColor.getRgbColor();
|
||
return !(rgbColor == null ? rgbColor2 != null : !((Object)rgbColor).equals(rgbColor2));
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof EnabledRgbColor;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
n3 = n3 * 59 + (this.isEnabledColor() ? 79 : 97);
|
||
RgbColor rgbColor = this.getRgbColor();
|
||
n3 = n3 * 59 + (rgbColor == null ? 43 : ((Object)rgbColor).hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "EnabledRgbColor(enabledColor=" + this.isEnabledColor() + ", rgbColor=" + this.getRgbColor() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.model;
|
||
|
||
public class RgbColor {
|
||
int r;
|
||
int g;
|
||
int b;
|
||
|
||
public RgbColor(int n2, int n3, int n4) {
|
||
this.r = n2;
|
||
this.g = n3;
|
||
this.b = n4;
|
||
}
|
||
|
||
public RgbColor() {
|
||
}
|
||
|
||
public int getR() {
|
||
return this.r;
|
||
}
|
||
|
||
public int getG() {
|
||
return this.g;
|
||
}
|
||
|
||
public int getB() {
|
||
return this.b;
|
||
}
|
||
|
||
public void setR(int n2) {
|
||
this.r = n2;
|
||
}
|
||
|
||
public void setG(int n2) {
|
||
this.g = n2;
|
||
}
|
||
|
||
public void setB(int n2) {
|
||
this.b = n2;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof RgbColor)) {
|
||
return false;
|
||
}
|
||
RgbColor rgbColor = (RgbColor)object;
|
||
if (!rgbColor.canEqual(this)) {
|
||
return false;
|
||
}
|
||
if (this.getR() != rgbColor.getR()) {
|
||
return false;
|
||
}
|
||
if (this.getG() != rgbColor.getG()) {
|
||
return false;
|
||
}
|
||
return this.getB() == rgbColor.getB();
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof RgbColor;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
n3 = n3 * 59 + this.getR();
|
||
n3 = n3 * 59 + this.getG();
|
||
n3 = n3 * 59 + this.getB();
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "RgbColor(r=" + this.getR() + ", g=" + this.getG() + ", b=" + this.getB() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.alibaba.fastjson.annotation.JSONField
|
||
*/
|
||
package cn.com.pism.batslog.model;
|
||
|
||
import com.alibaba.fastjson.annotation.JSONField;
|
||
|
||
public class ShowColorConfig {
|
||
@JSONField(ordinal=0)
|
||
private String keyword;
|
||
@JSONField(ordinal=1)
|
||
private boolean enabled;
|
||
@JSONField(ordinal=2)
|
||
private String bg;
|
||
@JSONField(ordinal=3)
|
||
private boolean bgEnabled;
|
||
@JSONField(ordinal=4)
|
||
private String fg;
|
||
@JSONField(ordinal=5)
|
||
private boolean fgEnabled;
|
||
|
||
public ShowColorConfig(String string, boolean bl, String string2, boolean bl2, String string3, boolean bl3) {
|
||
this.keyword = string;
|
||
this.enabled = bl;
|
||
this.bg = string2;
|
||
this.bgEnabled = bl2;
|
||
this.fg = string3;
|
||
this.fgEnabled = bl3;
|
||
}
|
||
|
||
public ShowColorConfig() {
|
||
}
|
||
|
||
public String getKeyword() {
|
||
return this.keyword;
|
||
}
|
||
|
||
public boolean isEnabled() {
|
||
return this.enabled;
|
||
}
|
||
|
||
public String getBg() {
|
||
return this.bg;
|
||
}
|
||
|
||
public boolean isBgEnabled() {
|
||
return this.bgEnabled;
|
||
}
|
||
|
||
public String getFg() {
|
||
return this.fg;
|
||
}
|
||
|
||
public boolean isFgEnabled() {
|
||
return this.fgEnabled;
|
||
}
|
||
|
||
public void setKeyword(String string) {
|
||
this.keyword = string;
|
||
}
|
||
|
||
public void setEnabled(boolean bl) {
|
||
this.enabled = bl;
|
||
}
|
||
|
||
public void setBg(String string) {
|
||
this.bg = string;
|
||
}
|
||
|
||
public void setBgEnabled(boolean bl) {
|
||
this.bgEnabled = bl;
|
||
}
|
||
|
||
public void setFg(String string) {
|
||
this.fg = string;
|
||
}
|
||
|
||
public void setFgEnabled(boolean bl) {
|
||
this.fgEnabled = bl;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof ShowColorConfig)) {
|
||
return false;
|
||
}
|
||
ShowColorConfig showColorConfig = (ShowColorConfig)object;
|
||
if (!showColorConfig.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getKeyword();
|
||
String string2 = showColorConfig.getKeyword();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
if (this.isEnabled() != showColorConfig.isEnabled()) {
|
||
return false;
|
||
}
|
||
String string3 = this.getBg();
|
||
String string4 = showColorConfig.getBg();
|
||
if (string3 == null ? string4 != null : !string3.equals(string4)) {
|
||
return false;
|
||
}
|
||
if (this.isBgEnabled() != showColorConfig.isBgEnabled()) {
|
||
return false;
|
||
}
|
||
String string5 = this.getFg();
|
||
String string6 = showColorConfig.getFg();
|
||
if (string5 == null ? string6 != null : !string5.equals(string6)) {
|
||
return false;
|
||
}
|
||
return this.isFgEnabled() == showColorConfig.isFgEnabled();
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof ShowColorConfig;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getKeyword();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
n3 = n3 * 59 + (this.isEnabled() ? 79 : 97);
|
||
String string2 = this.getBg();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
n3 = n3 * 59 + (this.isBgEnabled() ? 79 : 97);
|
||
String string3 = this.getFg();
|
||
n3 = n3 * 59 + (string3 == null ? 43 : string3.hashCode());
|
||
n3 = n3 * 59 + (this.isFgEnabled() ? 79 : 97);
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "ShowColorConfig(keyword=" + this.getKeyword() + ", enabled=" + this.isEnabled() + ", bg=" + this.getBg() + ", bgEnabled=" + this.isBgEnabled() + ", fg=" + this.getFg() + ", fgEnabled=" + this.isFgEnabled() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.ConsoleFolding
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.collections.CollectionUtils
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package cn.com.pism.batslog.d;
|
||
|
||
import cn.com.pism.batslog.f.g;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.intellij.execution.ConsoleFolding;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import org.apache.commons.collections.CollectionUtils;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class a
|
||
extends ConsoleFolding {
|
||
public static final Integer a = 2;
|
||
|
||
public boolean shouldFoldLine(@NotNull Project project, @NotNull String string) {
|
||
if (Boolean.TRUE.equals(cn.com.pism.batslog.f.a.a(project))) {
|
||
String string2;
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
String string3 = StringUtils.isBlank((CharSequence)mybatisCodeHelperLogSettingState.getSqlPrefix()) ? "Preparing:" : mybatisCodeHelperLogSettingState.getSqlPrefix();
|
||
String string4 = string2 = StringUtils.isBlank((CharSequence)mybatisCodeHelperLogSettingState.getParamsPrefix()) ? "Parameters:" : mybatisCodeHelperLogSettingState.getParamsPrefix();
|
||
if (Boolean.TRUE.equals(mybatisCodeHelperLogSettingState.getEnableMixedPrefix()) && string3.split(",").length > 1) {
|
||
this.b(project, string, string3, string2);
|
||
} else {
|
||
this.a(project, string, string3, string2);
|
||
}
|
||
}
|
||
return super.shouldFoldLine(project, string);
|
||
}
|
||
|
||
private void a(@NotNull Project project, @NotNull String string, String string2, String string3) {
|
||
List<String> list = cn.com.pism.batslog.f.a.d.get(project);
|
||
if (CollectionUtils.isEmpty(list)) {
|
||
list = new ArrayList<String>();
|
||
if (string.contains(string2)) {
|
||
list.add(string);
|
||
cn.com.pism.batslog.f.a.d.put(project, list);
|
||
}
|
||
} else {
|
||
String string4;
|
||
boolean bl;
|
||
String string5 = list.get(list.size() - 1);
|
||
String string6 = String.join((CharSequence)"\n", list);
|
||
boolean bl2 = bl = string6.contains(string2) && string6.contains(string3);
|
||
if (bl) {
|
||
boolean bl3 = bl = !g.boolean_a(string5, string3);
|
||
}
|
||
if (bl && StringUtils.countMatches((CharSequence)(string4 = String.join((CharSequence)"\n", list)), (CharSequence)string2) != 0 && StringUtils.countMatches((CharSequence)string4, (CharSequence)string3) != 0 && StringUtils.countMatches((CharSequence)string4, (CharSequence)string2) == StringUtils.countMatches((CharSequence)string4, (CharSequence)string3)) {
|
||
cn.com.pism.batslog.f.a.d.remove(project);
|
||
list = new ArrayList<String>();
|
||
g.a(string4, project);
|
||
}
|
||
list.add(string);
|
||
cn.com.pism.batslog.f.a.d.put(project, list);
|
||
}
|
||
}
|
||
|
||
private void b(@NotNull Project project, @NotNull String string, String string2, String string3) {
|
||
List<String> list = cn.com.pism.batslog.f.a.d.get(project);
|
||
if (CollectionUtils.isEmpty(list)) {
|
||
list = new ArrayList<String>();
|
||
if (StringUtils.containsAny((CharSequence)string, (CharSequence[])string2.split(","))) {
|
||
list.add(string);
|
||
cn.com.pism.batslog.f.a.d.put(project, list);
|
||
}
|
||
} else {
|
||
boolean bl;
|
||
String string4 = list.get(list.size() - 1);
|
||
String string5 = String.join((CharSequence)"\n", list);
|
||
boolean bl2 = bl = StringUtils.containsAny((CharSequence)string5, (CharSequence[])string2.split(",")) && string5.contains(string3);
|
||
if (bl) {
|
||
boolean bl3 = bl = !g.boolean_a(string4, string3);
|
||
}
|
||
if (bl) {
|
||
String string6 = String.join((CharSequence)"\n", list);
|
||
String[] stringArray = string2.split(",");
|
||
int n2 = 0;
|
||
for (String string7 : stringArray) {
|
||
n2 += StringUtils.countMatches((CharSequence)string6, (CharSequence)string7);
|
||
}
|
||
if (n2 != 0 && StringUtils.countMatches((CharSequence)string6, (CharSequence)string3) != 0 && n2 == StringUtils.countMatches((CharSequence)string6, (CharSequence)string3)) {
|
||
cn.com.pism.batslog.f.a.d.remove(project);
|
||
list = new ArrayList<String>();
|
||
g.a(string6, project);
|
||
}
|
||
}
|
||
list.add(string);
|
||
cn.com.pism.batslog.f.a.d.put(project, list);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xmlb.annotations.OptionTag
|
||
*/
|
||
package cn.com.pism.batslog.settings;
|
||
|
||
import cn.com.pism.batslog.c.a;
|
||
import cn.com.pism.batslog.c.b;
|
||
import cn.com.pism.batslog.c.c;
|
||
import cn.com.pism.batslog.enums.DbType;
|
||
import cn.com.pism.batslog.model.ConsoleColorConfig;
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
import com.intellij.util.xmlb.annotations.OptionTag;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Objects;
|
||
|
||
public class BatsLogConfig {
|
||
private String sqlPrefix = "Preparing:";
|
||
private String paramsPrefix = "Parameters:";
|
||
private String timeFormat = "yyyy-MM-dd HH:mm:ss";
|
||
private Boolean desensitize = Boolean.FALSE;
|
||
private Boolean prettyFormat = Boolean.TRUE;
|
||
private Boolean parameterized = Boolean.FALSE;
|
||
private Boolean toUpperCase = Boolean.FALSE;
|
||
private Boolean addTimestamp = Boolean.TRUE;
|
||
private Boolean autoJumpOut = Boolean.FALSE;
|
||
private Boolean startWithProject = Boolean.FALSE;
|
||
private Boolean enableMixedPrefix = Boolean.FALSE;
|
||
private String encoding = "AUTO";
|
||
private Boolean removeDuplicateSql = true;
|
||
private Boolean formatSql = true;
|
||
private int removeDuplicateTimeInterval = 1000;
|
||
private String deleteLogSuffix = "";
|
||
@OptionTag(converter=c.class)
|
||
public DbType dbType = DbType.OTHER;
|
||
@OptionTag(converter=a.class)
|
||
private RgbColor keyWordDefCol = new RgbColor(204, 120, 50);
|
||
private boolean enabledKeyWordDefCol = true;
|
||
@OptionTag(converter=b.class)
|
||
private List<ConsoleColorConfig> colorConfigs = new ArrayList<ConsoleColorConfig>();
|
||
|
||
public String getSqlPrefix() {
|
||
return this.sqlPrefix;
|
||
}
|
||
|
||
public String getParamsPrefix() {
|
||
return this.paramsPrefix;
|
||
}
|
||
|
||
public String getTimeFormat() {
|
||
return this.timeFormat;
|
||
}
|
||
|
||
public Boolean getDesensitize() {
|
||
return this.desensitize;
|
||
}
|
||
|
||
public Boolean getPrettyFormat() {
|
||
return this.prettyFormat;
|
||
}
|
||
|
||
public Boolean getParameterized() {
|
||
return this.parameterized;
|
||
}
|
||
|
||
public Boolean getToUpperCase() {
|
||
return this.toUpperCase;
|
||
}
|
||
|
||
public Boolean getAddTimestamp() {
|
||
return this.addTimestamp;
|
||
}
|
||
|
||
public Boolean getAutoJumpOut() {
|
||
return this.autoJumpOut;
|
||
}
|
||
|
||
public Boolean getStartWithProject() {
|
||
return this.startWithProject;
|
||
}
|
||
|
||
public Boolean getEnableMixedPrefix() {
|
||
return this.enableMixedPrefix;
|
||
}
|
||
|
||
public String getEncoding() {
|
||
return this.encoding;
|
||
}
|
||
|
||
public Boolean getRemoveDuplicateSql() {
|
||
return this.removeDuplicateSql;
|
||
}
|
||
|
||
public Boolean getFormatSql() {
|
||
return this.formatSql;
|
||
}
|
||
|
||
public int getRemoveDuplicateTimeInterval() {
|
||
return this.removeDuplicateTimeInterval;
|
||
}
|
||
|
||
public DbType getDbType() {
|
||
return this.dbType;
|
||
}
|
||
|
||
public RgbColor getKeyWordDefCol() {
|
||
return this.keyWordDefCol;
|
||
}
|
||
|
||
public boolean isEnabledKeyWordDefCol() {
|
||
return this.enabledKeyWordDefCol;
|
||
}
|
||
|
||
public List<ConsoleColorConfig> getColorConfigs() {
|
||
return this.colorConfigs;
|
||
}
|
||
|
||
public void setSqlPrefix(String string) {
|
||
this.sqlPrefix = string;
|
||
}
|
||
|
||
public void setParamsPrefix(String string) {
|
||
this.paramsPrefix = string;
|
||
}
|
||
|
||
public void setTimeFormat(String string) {
|
||
this.timeFormat = string;
|
||
}
|
||
|
||
public void setDesensitize(Boolean bl) {
|
||
this.desensitize = bl;
|
||
}
|
||
|
||
public void setPrettyFormat(Boolean bl) {
|
||
this.prettyFormat = bl;
|
||
}
|
||
|
||
public void setParameterized(Boolean bl) {
|
||
this.parameterized = bl;
|
||
}
|
||
|
||
public void setToUpperCase(Boolean bl) {
|
||
this.toUpperCase = bl;
|
||
}
|
||
|
||
public void setAddTimestamp(Boolean bl) {
|
||
this.addTimestamp = bl;
|
||
}
|
||
|
||
public void setAutoJumpOut(Boolean bl) {
|
||
this.autoJumpOut = bl;
|
||
}
|
||
|
||
public void setStartWithProject(Boolean bl) {
|
||
this.startWithProject = bl;
|
||
}
|
||
|
||
public void setEnableMixedPrefix(Boolean bl) {
|
||
this.enableMixedPrefix = bl;
|
||
}
|
||
|
||
public void setEncoding(String string) {
|
||
this.encoding = string;
|
||
}
|
||
|
||
public void setRemoveDuplicateSql(Boolean bl) {
|
||
this.removeDuplicateSql = bl;
|
||
}
|
||
|
||
public void setFormatSql(Boolean bl) {
|
||
this.formatSql = bl;
|
||
}
|
||
|
||
public void setRemoveDuplicateTimeInterval(int n2) {
|
||
this.removeDuplicateTimeInterval = n2;
|
||
}
|
||
|
||
public void setDbType(DbType dbType) {
|
||
this.dbType = dbType;
|
||
}
|
||
|
||
public void setKeyWordDefCol(RgbColor rgbColor) {
|
||
this.keyWordDefCol = rgbColor;
|
||
}
|
||
|
||
public void setEnabledKeyWordDefCol(boolean bl) {
|
||
this.enabledKeyWordDefCol = bl;
|
||
}
|
||
|
||
public void setColorConfigs(List<ConsoleColorConfig> list) {
|
||
this.colorConfigs = list;
|
||
}
|
||
|
||
public String getDeleteLogSuffix() {
|
||
return this.deleteLogSuffix;
|
||
}
|
||
|
||
public void setDeleteLogSuffix(String string) {
|
||
this.deleteLogSuffix = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (this == object) {
|
||
return true;
|
||
}
|
||
if (object == null || this.getClass() != object.getClass()) {
|
||
return false;
|
||
}
|
||
BatsLogConfig batsLogConfig = (BatsLogConfig)object;
|
||
if (this.removeDuplicateTimeInterval != batsLogConfig.removeDuplicateTimeInterval) {
|
||
return false;
|
||
}
|
||
if (this.enabledKeyWordDefCol != batsLogConfig.enabledKeyWordDefCol) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.sqlPrefix, batsLogConfig.sqlPrefix)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.paramsPrefix, batsLogConfig.paramsPrefix)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.timeFormat, batsLogConfig.timeFormat)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.desensitize, batsLogConfig.desensitize)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.prettyFormat, batsLogConfig.prettyFormat)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.parameterized, batsLogConfig.parameterized)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.toUpperCase, batsLogConfig.toUpperCase)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.addTimestamp, batsLogConfig.addTimestamp)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.autoJumpOut, batsLogConfig.autoJumpOut)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.startWithProject, batsLogConfig.startWithProject)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.enableMixedPrefix, batsLogConfig.enableMixedPrefix)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.encoding, batsLogConfig.encoding)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.removeDuplicateSql, batsLogConfig.removeDuplicateSql)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.formatSql, batsLogConfig.formatSql)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.deleteLogSuffix, batsLogConfig.deleteLogSuffix)) {
|
||
return false;
|
||
}
|
||
if (this.dbType != batsLogConfig.dbType) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.keyWordDefCol, batsLogConfig.keyWordDefCol)) {
|
||
return false;
|
||
}
|
||
return Objects.equals(this.colorConfigs, batsLogConfig.colorConfigs);
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = this.sqlPrefix != null ? this.sqlPrefix.hashCode() : 0;
|
||
n2 = 31 * n2 + (this.paramsPrefix != null ? this.paramsPrefix.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.timeFormat != null ? this.timeFormat.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.desensitize != null ? this.desensitize.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.prettyFormat != null ? this.prettyFormat.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.parameterized != null ? this.parameterized.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.toUpperCase != null ? this.toUpperCase.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.addTimestamp != null ? this.addTimestamp.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.autoJumpOut != null ? this.autoJumpOut.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.startWithProject != null ? this.startWithProject.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.enableMixedPrefix != null ? this.enableMixedPrefix.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.encoding != null ? this.encoding.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.removeDuplicateSql != null ? this.removeDuplicateSql.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.formatSql != null ? this.formatSql.hashCode() : 0);
|
||
n2 = 31 * n2 + this.removeDuplicateTimeInterval;
|
||
n2 = 31 * n2 + (this.deleteLogSuffix != null ? this.deleteLogSuffix.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.dbType != null ? this.dbType.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.keyWordDefCol != null ? this.keyWordDefCol.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.enabledKeyWordDefCol ? 1 : 0);
|
||
n2 = 31 * n2 + (this.colorConfigs != null ? this.colorConfigs.hashCode() : 0);
|
||
return n2;
|
||
}
|
||
|
||
public String toString() {
|
||
return "BatsLogConfig{sqlPrefix='" + this.sqlPrefix + "', paramsPrefix='" + this.paramsPrefix + "', timeFormat='" + this.timeFormat + "', desensitize=" + this.desensitize + ", prettyFormat=" + this.prettyFormat + ", parameterized=" + this.parameterized + ", toUpperCase=" + this.toUpperCase + ", addTimestamp=" + this.addTimestamp + ", autoJumpOut=" + this.autoJumpOut + ", startWithProject=" + this.startWithProject + ", enableMixedPrefix=" + this.enableMixedPrefix + ", encoding='" + this.encoding + "', removeDuplicateSql=" + this.removeDuplicateSql + ", formatSql=" + this.formatSql + ", removeDuplicateTimeInterval=" + this.removeDuplicateTimeInterval + ", deleteLogSuffix='" + this.deleteLogSuffix + "', dbType=" + this.dbType + ", keyWordDefCol=" + this.keyWordDefCol + ", enabledKeyWordDefCol=" + this.enabledKeyWordDefCol + ", colorConfigs=" + this.colorConfigs + "}";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.options.ConfigurationException
|
||
* com.intellij.openapi.options.SearchableConfigurable
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.settings;
|
||
|
||
import cn.com.pism.batslog.e.i;
|
||
import com.intellij.openapi.options.ConfigurationException;
|
||
import com.intellij.openapi.options.SearchableConfigurable;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class BatsLogConfigurable
|
||
implements SearchableConfigurable {
|
||
private i settingForm;
|
||
|
||
@NotNull
|
||
public String getId() {
|
||
return "BatsLog";
|
||
}
|
||
|
||
public String getDisplayName() {
|
||
return this.getId();
|
||
}
|
||
|
||
@Nullable
|
||
public JComponent createComponent() {
|
||
if (this.settingForm == null) {
|
||
this.settingForm = new i();
|
||
}
|
||
return new JLabel("<22><><BF><AA><B7><A2>...");
|
||
}
|
||
|
||
public boolean isModified() {
|
||
return false;
|
||
}
|
||
|
||
public void apply() throws ConfigurationException {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.components.PersistentStateComponent
|
||
* com.intellij.openapi.components.RoamingType
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.components.State
|
||
* com.intellij.openapi.components.Storage
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.util.xmlb.XmlSerializerUtil
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.settings;
|
||
|
||
import cn.com.pism.batslog.settings.BatsLogConfig;
|
||
import com.intellij.openapi.components.PersistentStateComponent;
|
||
import com.intellij.openapi.components.RoamingType;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.components.State;
|
||
import com.intellij.openapi.components.Storage;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.util.xmlb.XmlSerializerUtil;
|
||
import java.io.Serializable;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
@State(name="MybatisCodeHelperBatsLogSettingState", storages={@Storage(value="MybatisCodeHelperBatsLog.xml", roamingType=RoamingType.DISABLED)})
|
||
public class MybatisCodeHelperLogSettingState
|
||
extends BatsLogConfig
|
||
implements PersistentStateComponent<MybatisCodeHelperLogSettingState>,
|
||
Serializable {
|
||
@Nullable
|
||
public MybatisCodeHelperLogSettingState getState() {
|
||
return this;
|
||
}
|
||
|
||
public void loadState(@NotNull MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState) {
|
||
XmlSerializerUtil.copyBean((Object)mybatisCodeHelperLogSettingState, (Object)this);
|
||
}
|
||
|
||
public static MybatisCodeHelperLogSettingState getInstance(Project project) {
|
||
return (MybatisCodeHelperLogSettingState)ServiceManager.getService((Project)project, MybatisCodeHelperLogSettingState.class);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return "MybatisCodeHelperLogSettingState()";
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof MybatisCodeHelperLogSettingState)) {
|
||
return false;
|
||
}
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = (MybatisCodeHelperLogSettingState)object;
|
||
if (!mybatisCodeHelperLogSettingState.canEqual(this)) {
|
||
return false;
|
||
}
|
||
return super.equals(object);
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof MybatisCodeHelperLogSettingState;
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
int n2 = super.hashCode();
|
||
return n2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.components.PersistentStateComponent
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.components.State
|
||
* com.intellij.openapi.components.Storage
|
||
* com.intellij.util.xmlb.XmlSerializerUtil
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.settings;
|
||
|
||
import cn.com.pism.batslog.settings.BatsLogConfig;
|
||
import com.intellij.openapi.components.PersistentStateComponent;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.components.State;
|
||
import com.intellij.openapi.components.Storage;
|
||
import com.intellij.util.xmlb.XmlSerializerUtil;
|
||
import java.io.Serializable;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
@State(name="MybatisCodeHelperLog", storages={@Storage(value="$APP_CONFIG$/MybatisCodeHelperLog.xml")})
|
||
public class MybatisCodeHelperLogState
|
||
extends BatsLogConfig
|
||
implements PersistentStateComponent<MybatisCodeHelperLogState>,
|
||
Serializable {
|
||
@Nullable
|
||
public MybatisCodeHelperLogState getState() {
|
||
return this;
|
||
}
|
||
|
||
public void loadState(@NotNull MybatisCodeHelperLogState mybatisCodeHelperLogState) {
|
||
XmlSerializerUtil.copyBean((Object)mybatisCodeHelperLogState, (Object)this);
|
||
}
|
||
|
||
public static MybatisCodeHelperLogState getInstance() {
|
||
return (MybatisCodeHelperLogState)ServiceManager.getService(MybatisCodeHelperLogState.class);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return "MybatisCodeHelperLogState()";
|
||
}
|
||
|
||
@Override
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof MybatisCodeHelperLogState)) {
|
||
return false;
|
||
}
|
||
MybatisCodeHelperLogState mybatisCodeHelperLogState = (MybatisCodeHelperLogState)object;
|
||
if (!mybatisCodeHelperLogState.canEqual(this)) {
|
||
return false;
|
||
}
|
||
return super.equals(object);
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof MybatisCodeHelperLogState;
|
||
}
|
||
|
||
@Override
|
||
public int hashCode() {
|
||
int n2 = super.hashCode();
|
||
return n2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
@FunctionalInterface
|
||
public interface a<T> {
|
||
public void call(T var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.ColorChooserService
|
||
* com.intellij.util.ui.JBUI
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import cn.com.pism.batslog.e.a;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.ColorChooserService;
|
||
import com.intellij.util.ui.JBUI;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Graphics;
|
||
import java.awt.Insets;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JPanel;
|
||
|
||
public class b
|
||
extends JButton {
|
||
private Color var_java_awt_Color_a;
|
||
private int var_int_a;
|
||
private int b;
|
||
|
||
@Override
|
||
protected void init(String string, Icon icon) {
|
||
super.init(string, icon);
|
||
}
|
||
|
||
public b(Project project, Color color, int n2, int n3, a<Color> a2) {
|
||
this.var_int_a = n2;
|
||
this.b = n3;
|
||
this.var_java_awt_Color_a = color != null ? color : cn.com.pism.batslog.b.a.var_java_awt_Color_a;
|
||
this.a(project, color, a2);
|
||
}
|
||
|
||
public b(Project project, Color color) {
|
||
new b(project, color, 12, 12);
|
||
}
|
||
|
||
public b(Project project, Color color, int n2, int n3) {
|
||
new b(project, color, n2, n3, color2 -> {
|
||
this.var_java_awt_Color_a = color;
|
||
});
|
||
}
|
||
|
||
public b() {
|
||
this.a(null, null, color -> {
|
||
this.var_java_awt_Color_a = color;
|
||
});
|
||
}
|
||
|
||
private void a(Project project, Color color, a<Color> a2) {
|
||
this.setMargin((Insets)JBUI.emptyInsets());
|
||
this.setFocusable(false);
|
||
this.setDefaultCapable(false);
|
||
this.setFocusable(false);
|
||
if (color != null) {
|
||
this.var_java_awt_Color_a = color;
|
||
}
|
||
this.addActionListener(actionEvent -> {
|
||
Color color = ColorChooserService.getInstance().showDialog((Component)new JPanel(), "ѡ<><D1A1><D4><F1>ɫ", this.var_java_awt_Color_a);
|
||
if (color != null) {
|
||
this.var_java_awt_Color_a = color;
|
||
a2.call(this.var_java_awt_Color_a);
|
||
}
|
||
});
|
||
}
|
||
|
||
@Override
|
||
public void paint(Graphics graphics) {
|
||
Color color = graphics.getColor();
|
||
if (this.var_java_awt_Color_a == null) {
|
||
graphics.setColor(cn.com.pism.batslog.b.a.var_java_awt_Color_a);
|
||
} else {
|
||
graphics.setColor(this.var_java_awt_Color_a);
|
||
}
|
||
graphics.fillRect(0, 0, this.var_int_a, this.b);
|
||
graphics.setColor(color);
|
||
}
|
||
|
||
@Override
|
||
public Dimension getMinimumSize() {
|
||
return this.getPreferredSize();
|
||
}
|
||
|
||
@Override
|
||
public Dimension getMaximumSize() {
|
||
return this.getPreferredSize();
|
||
}
|
||
|
||
@Override
|
||
public Dimension getPreferredSize() {
|
||
return new Dimension(this.var_int_a, this.b);
|
||
}
|
||
|
||
public Color a() {
|
||
return this.var_java_awt_Color_a;
|
||
}
|
||
|
||
@Override
|
||
public int getWidth() {
|
||
return this.var_int_a;
|
||
}
|
||
|
||
@Override
|
||
public int getHeight() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(Color color) {
|
||
this.var_java_awt_Color_a = color;
|
||
}
|
||
|
||
public void a(int n2) {
|
||
this.var_int_a = n2;
|
||
}
|
||
|
||
public void b(int n2) {
|
||
this.b = n2;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return "ColorButton(selectColor=" + this.a() + ", width=" + this.getWidth() + ", height=" + this.getHeight() + ")";
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof b)) {
|
||
return false;
|
||
}
|
||
b b2 = (b)object;
|
||
if (!b2.a(this)) {
|
||
return false;
|
||
}
|
||
if (!super.equals(object)) {
|
||
return false;
|
||
}
|
||
Color color = this.a();
|
||
Color color2 = b2.a();
|
||
if (color == null ? color2 != null : !((Object)color).equals(color2)) {
|
||
return false;
|
||
}
|
||
if (this.getWidth() != b2.getWidth()) {
|
||
return false;
|
||
}
|
||
return this.getHeight() == b2.getHeight();
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof b;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = super.hashCode();
|
||
Color color = this.a();
|
||
n3 = n3 * 59 + (color == null ? 43 : ((Object)color).hashCode());
|
||
n3 = n3 * 59 + this.getWidth();
|
||
n3 = n3 * 59 + this.getHeight();
|
||
return n3;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
*/
|
||
package cn.com.pism.batslog.e.a;
|
||
|
||
import cn.com.pism.batslog.e.b;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
|
||
public class a {
|
||
private b var_cn_com_pism_batslog_e_b_a;
|
||
private JCheckBox var_javax_swing_JCheckBox_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Color var_java_awt_Color_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private int var_int_a;
|
||
private int var_int_b;
|
||
private cn.com.pism.batslog.e.a<Color> var_cn_com_pism_batslog_e_a_java_awt_Color__b;
|
||
cn.com.pism.batslog.e.a<Boolean> var_cn_com_pism_batslog_e_a_java_lang_Boolean__a;
|
||
private String var_java_lang_String_a;
|
||
private boolean var_boolean_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public a(Project project, Color color, int n2, int n3, String string, cn.com.pism.batslog.e.a<Color> a2, cn.com.pism.batslog.e.a<Boolean> a3) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_awt_Color_a = color;
|
||
this.var_int_a = n2;
|
||
this.var_int_b = n3;
|
||
this.var_int_b = (int)a2;
|
||
this.var_cn_com_pism_batslog_e_b_a = a3;
|
||
this.var_java_lang_String_a = string;
|
||
this.void_b();
|
||
this.var_javax_swing_JCheckBox_a.addActionListener(actionEvent -> {
|
||
if (a3 != null) {
|
||
this.var_boolean_a = this.var_javax_swing_JCheckBox_a.isSelected();
|
||
a3.call(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
}
|
||
});
|
||
this.var_javax_swing_JCheckBox_a.setToolTipText(string);
|
||
}
|
||
|
||
public Color java_awt_Color_a() {
|
||
if (!this.var_javax_swing_JCheckBox_a.isSelected()) {
|
||
return null;
|
||
}
|
||
return this.var_java_awt_Color_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_cn_com_pism_batslog_e_b_a = new b(this.var_com_intellij_openapi_project_Project_a, this.var_java_awt_Color_a, this.var_int_a, this.var_int_b, (cn.com.pism.batslog.e.a<Color>)this.var_int_b);
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
this.var_javax_swing_JCheckBox_a.setSelected(bl);
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.var_javax_swing_JCheckBox_a.setSelected(bl);
|
||
}
|
||
|
||
private void void_b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.setMaximumSize(new Dimension(40, 20));
|
||
this.var_javax_swing_JPanel_a.setMinimumSize(new Dimension(1, 1));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_a.setLabel("");
|
||
this.var_javax_swing_JCheckBox_a.setSelected(true);
|
||
this.var_javax_swing_JCheckBox_a.setText("");
|
||
this.var_javax_swing_JCheckBox_a.setToolTipText(this.a("text/BatsLogBundle", "config.form.console.colorConfigForm.table.label.enable"));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_cn_com_pism_batslog_e_b_a.setText("Button");
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_cn_com_pism_batslog_e_b_a, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = this.getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public b cn_com_pism_batslog_e_b_a() {
|
||
return this.var_cn_com_pism_batslog_e_b_a;
|
||
}
|
||
|
||
public JCheckBox javax_swing_JCheckBox_a() {
|
||
return this.var_javax_swing_JCheckBox_a;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public int int_a() {
|
||
return this.var_int_a;
|
||
}
|
||
|
||
public int int_b() {
|
||
return this.var_int_b;
|
||
}
|
||
|
||
public cn.com.pism.batslog.e.a<Color> a() {
|
||
return this.var_int_b;
|
||
}
|
||
|
||
public cn.com.pism.batslog.e.a<Boolean> b() {
|
||
return this.var_cn_com_pism_batslog_e_b_a;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(b b2) {
|
||
this.var_cn_com_pism_batslog_e_b_a = b2;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(Color color) {
|
||
this.var_java_awt_Color_a = color;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void a(int n2) {
|
||
this.var_int_a = n2;
|
||
}
|
||
|
||
public void b(int n2) {
|
||
this.var_int_b = n2;
|
||
}
|
||
|
||
public void a(cn.com.pism.batslog.e.a<Color> a2) {
|
||
this.var_int_b = (int)a2;
|
||
}
|
||
|
||
public void b(cn.com.pism.batslog.e.a<Boolean> a2) {
|
||
this.var_cn_com_pism_batslog_e_b_a = a2;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof a)) {
|
||
return false;
|
||
}
|
||
a a2 = (a)object;
|
||
if (!a2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = a2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent3 = this.javax_swing_JComponent_a();
|
||
JComponent jComponent4 = a2.javax_swing_JComponent_a();
|
||
if (jComponent3 == null ? jComponent4 != null : !jComponent3.equals(jComponent4)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = a2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
Color color = this.java_awt_Color_a();
|
||
Color color2 = a2.java_awt_Color_a();
|
||
if (color == null ? color2 != null : !((Object)color).equals(color2)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent5 = this.javax_swing_JComponent_a();
|
||
JComponent jComponent6 = a2.javax_swing_JComponent_a();
|
||
if (jComponent5 == null ? jComponent6 != null : !jComponent5.equals(jComponent6)) {
|
||
return false;
|
||
}
|
||
if (this.int_a() != a2.int_a()) {
|
||
return false;
|
||
}
|
||
if (this.int_b() != a2.int_b()) {
|
||
return false;
|
||
}
|
||
cn.com.pism.batslog.e.a<Color> a3 = this.a();
|
||
cn.com.pism.batslog.e.a<Color> a4 = a2.a();
|
||
if (a3 == null ? a4 != null : !a3.equals(a4)) {
|
||
return false;
|
||
}
|
||
cn.com.pism.batslog.e.a<Boolean> a5 = this.b();
|
||
cn.com.pism.batslog.e.a<Boolean> a6 = a2.b();
|
||
if (a5 == null ? a6 != null : !a5.equals(a6)) {
|
||
return false;
|
||
}
|
||
String string = this.java_lang_String_a();
|
||
String string2 = a2.java_lang_String_a();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
return this.boolean_a() == a2.boolean_a();
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof a;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JComponent jComponent2 = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent2 == null ? 43 : jComponent2.hashCode());
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
Color color = this.java_awt_Color_a();
|
||
n3 = n3 * 59 + (color == null ? 43 : ((Object)color).hashCode());
|
||
JComponent jComponent3 = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent3 == null ? 43 : jComponent3.hashCode());
|
||
n3 = n3 * 59 + this.int_a();
|
||
n3 = n3 * 59 + this.int_b();
|
||
cn.com.pism.batslog.e.a<Color> a2 = this.a();
|
||
n3 = n3 * 59 + (a2 == null ? 43 : a2.hashCode());
|
||
cn.com.pism.batslog.e.a<Boolean> a3 = this.b();
|
||
n3 = n3 * 59 + (a3 == null ? 43 : a3.hashCode());
|
||
String string = this.java_lang_String_a();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
n3 = n3 * 59 + (this.boolean_a() ? 79 : 97);
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "EnabledColorButton(colorButton=" + (b)this.javax_swing_JComponent_a() + ", enableCheckBox=" + (JCheckBox)this.javax_swing_JComponent_a() + ", project=" + this.com_intellij_openapi_project_Project_a() + ", color=" + this.java_awt_Color_a() + ", root=" + (JPanel)this.javax_swing_JComponent_a() + ", width=" + this.int_a() + ", height=" + this.int_b() + ", colorCallback=" + this.a() + ", enabled=" + this.b() + ", enabledTips=" + this.java_lang_String_a() + ", enabledColor=" + this.boolean_a() + ")";
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.GuiUtils
|
||
* com.intellij.ui.LanguageTextField
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
*/
|
||
package cn.com.pism.batslog.e.a;
|
||
|
||
import cn.com.pism.batslog.e.a.d;
|
||
import cn.com.pism.batslog.f.a;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.GuiUtils;
|
||
import com.intellij.ui.LanguageTextField;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JSplitPane;
|
||
|
||
public class b {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel b;
|
||
private JPanel c;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private d var_cn_com_pism_batslog_e_a_d_a;
|
||
private BslErrorMod var_cn_com_pism_batslog_model_BslErrorMod_a;
|
||
private LanguageTextField var_com_intellij_ui_LanguageTextField_a;
|
||
|
||
public b(Project project, BslErrorMod bslErrorMod) {
|
||
d d2;
|
||
this.void_b();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_cn_com_pism_batslog_e_a_d_a = d2 = new d(project, bslErrorMod.getSql());
|
||
this.b.add(d2.javax_swing_JComponent_a());
|
||
this.var_com_intellij_ui_LanguageTextField_a = cn.com.pism.batslog.f.a.a(Language.findLanguageByID((String)"TEXT"), project, bslErrorMod.getParams());
|
||
this.c.add((Component)this.var_com_intellij_ui_LanguageTextField_a);
|
||
GuiUtils.replaceJSplitPaneWithIDEASplitter((JComponent)this.var_javax_swing_JPanel_a);
|
||
}
|
||
|
||
public void void_a() {
|
||
this.var_cn_com_pism_batslog_e_a_d_a.void_a();
|
||
}
|
||
|
||
private void void_b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.setMaximumSize(new Dimension(Integer.MAX_VALUE, 200));
|
||
this.var_javax_swing_JPanel_a.setMinimumSize(new Dimension(66, 200));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(-1, 200), new Dimension(-1, 200), new Dimension(-1, 200), 0, false));
|
||
JSplitPane jSplitPane = new JSplitPane();
|
||
jPanel.add((Component)jSplitPane, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, new Dimension(200, 200), null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jSplitPane.setLeftComponent(jPanel2);
|
||
this.b = new JPanel();
|
||
this.b.setLayout(new BorderLayout(0, 0));
|
||
jPanel2.add((Component)this.b, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(-1, 200), new Dimension(-1, 200), new Dimension(-1, 200), 0, false));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jSplitPane.setRightComponent(jPanel3);
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel3.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
this.c = new JPanel();
|
||
this.c.setLayout(new BorderLayout(0, 0));
|
||
jScrollPane.setViewportView(this.c);
|
||
this.c.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_b() {
|
||
return this.b;
|
||
}
|
||
|
||
public JPanel c() {
|
||
return this.c;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public d cn_com_pism_batslog_e_a_d_a() {
|
||
return this.var_cn_com_pism_batslog_e_a_d_a;
|
||
}
|
||
|
||
public BslErrorMod cn_com_pism_batslog_model_BslErrorMod_a() {
|
||
return this.var_cn_com_pism_batslog_model_BslErrorMod_a;
|
||
}
|
||
|
||
public LanguageTextField com_intellij_ui_LanguageTextField_a() {
|
||
return this.var_com_intellij_ui_LanguageTextField_a;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.b = jPanel;
|
||
}
|
||
|
||
public void c(JPanel jPanel) {
|
||
this.c = jPanel;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(d d2) {
|
||
this.var_cn_com_pism_batslog_e_a_d_a = d2;
|
||
}
|
||
|
||
public void a(BslErrorMod bslErrorMod) {
|
||
this.var_cn_com_pism_batslog_model_BslErrorMod_a = bslErrorMod;
|
||
}
|
||
|
||
public void a(LanguageTextField languageTextField) {
|
||
this.var_com_intellij_ui_LanguageTextField_a = languageTextField;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof b)) {
|
||
return false;
|
||
}
|
||
b b2 = (b)object;
|
||
if (!b2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = b2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel = this.javax_swing_JPanel_b();
|
||
JPanel jPanel2 = b2.javax_swing_JPanel_b();
|
||
if (jPanel == null ? jPanel2 != null : !jPanel.equals(jPanel2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel3 = this.c();
|
||
JPanel jPanel4 = b2.c();
|
||
if (jPanel3 == null ? jPanel4 != null : !jPanel3.equals(jPanel4)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = b2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
d d2 = this.cn_com_pism_batslog_e_a_d_a();
|
||
d d3 = b2.cn_com_pism_batslog_e_a_d_a();
|
||
if (d2 == null ? d3 != null : !((Object)d2).equals(d3)) {
|
||
return false;
|
||
}
|
||
BslErrorMod bslErrorMod = this.cn_com_pism_batslog_model_BslErrorMod_a();
|
||
BslErrorMod bslErrorMod2 = b2.cn_com_pism_batslog_model_BslErrorMod_a();
|
||
if (bslErrorMod == null ? bslErrorMod2 != null : !((Object)bslErrorMod).equals(bslErrorMod2)) {
|
||
return false;
|
||
}
|
||
LanguageTextField languageTextField = this.com_intellij_ui_LanguageTextField_a();
|
||
LanguageTextField languageTextField2 = b2.com_intellij_ui_LanguageTextField_a();
|
||
return !(languageTextField == null ? languageTextField2 != null : !languageTextField.equals(languageTextField2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof b;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JPanel jPanel = this.javax_swing_JPanel_b();
|
||
n3 = n3 * 59 + (jPanel == null ? 43 : jPanel.hashCode());
|
||
JPanel jPanel2 = this.c();
|
||
n3 = n3 * 59 + (jPanel2 == null ? 43 : jPanel2.hashCode());
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
d d2 = this.cn_com_pism_batslog_e_a_d_a();
|
||
n3 = n3 * 59 + (d2 == null ? 43 : ((Object)d2).hashCode());
|
||
BslErrorMod bslErrorMod = this.cn_com_pism_batslog_model_BslErrorMod_a();
|
||
n3 = n3 * 59 + (bslErrorMod == null ? 43 : ((Object)bslErrorMod).hashCode());
|
||
LanguageTextField languageTextField = this.com_intellij_ui_LanguageTextField_a();
|
||
n3 = n3 * 59 + (languageTextField == null ? 43 : languageTextField.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "SqlAndParamsPanel(root=" + (JPanel)this.javax_swing_JComponent_a() + ", sqlContent=" + this.javax_swing_JPanel_b() + ", paramsEditorPanel=" + this.c() + ", project=" + this.com_intellij_openapi_project_Project_a() + ", sqlEditorPanel=" + this.cn_com_pism_batslog_e_a_d_a() + ", bslErrorMod=" + this.cn_com_pism_batslog_model_BslErrorMod_a() + ", textField=" + this.com_intellij_ui_LanguageTextField_a() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.ComboBox
|
||
* com.intellij.ui.GuiUtils
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.jgoodies.forms.layout.CellConstraints
|
||
* com.jgoodies.forms.layout.FormLayout
|
||
* org.apache.commons.lang3.StringUtils
|
||
*/
|
||
package cn.com.pism.batslog.e.a;
|
||
|
||
import cn.com.pism.batslog.f.g;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.ComboBox;
|
||
import com.intellij.ui.GuiUtils;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.jgoodies.forms.layout.CellConstraints;
|
||
import com.jgoodies.forms.layout.FormLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
|
||
public class c {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel b;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private BslErrorMod var_cn_com_pism_batslog_model_BslErrorMod_a;
|
||
|
||
public c(Project project, BslErrorMod bslErrorMod) {
|
||
this.void_a();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_cn_com_pism_batslog_model_BslErrorMod_a = bslErrorMod;
|
||
String string = bslErrorMod.getSql();
|
||
boolean bl = string.endsWith("?");
|
||
String[] stringArray = string.split("\\?");
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
for (int i2 = 0; i2 < stringArray.length; ++i2) {
|
||
arrayList.add("default");
|
||
}
|
||
FormLayout formLayout = new FormLayout("5dlu, right:default, 5dlu, 80dlu, 60dlu", String.join((CharSequence)",", arrayList));
|
||
this.b.setLayout((LayoutManager)formLayout);
|
||
String string2 = bslErrorMod.getParams();
|
||
List<Object> list = null;
|
||
try {
|
||
list = g.b(string2);
|
||
}
|
||
catch (Exception exception) {
|
||
String[] stringArray2;
|
||
list = new ArrayList<Object>();
|
||
for (String string3 : stringArray2 = string2.split(",")) {
|
||
if (string3.indexOf("(") > 0 && string3.indexOf(")") > 0 && string3.indexOf("(") < string3.indexOf(")")) {
|
||
String string4 = string3.substring(string3.lastIndexOf("(") + 1);
|
||
String string5 = string3.substring(string3.lastIndexOf("(") + 2, string3.lastIndexOf(")") + 1);
|
||
try {
|
||
list.add(g.java_lang_Object_a(string4, string5));
|
||
}
|
||
catch (ClassNotFoundException classNotFoundException) {
|
||
exception.printStackTrace();
|
||
}
|
||
continue;
|
||
}
|
||
try {
|
||
list.add(g.java_lang_Object_a(string3, null));
|
||
}
|
||
catch (ClassNotFoundException classNotFoundException) {
|
||
exception.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
this.a(stringArray, list, bl);
|
||
GuiUtils.replaceJSplitPaneWithIDEASplitter((JComponent)this.var_javax_swing_JPanel_a);
|
||
}
|
||
|
||
private void a(String[] stringArray, List<Object> list, boolean bl) {
|
||
if (stringArray.length >= list.size()) {
|
||
boolean bl2 = list.size() == 0;
|
||
for (int i2 = 0; i2 < stringArray.length; ++i2) {
|
||
Object object = stringArray[i2];
|
||
if (((String)object).length() > 50) {
|
||
object = "<22><><A1><AD>" + ((String)object).substring(((String)object).length() - 50);
|
||
}
|
||
String string = "";
|
||
String string2 = "";
|
||
if (i2 < list.size()) {
|
||
Object object2 = list.get(i2);
|
||
string = object2.getClass().getTypeName();
|
||
string = string.substring(string.lastIndexOf(".") + 1);
|
||
string2 = object2.toString();
|
||
}
|
||
if (bl2) {
|
||
string = g.var_java_lang_String_arr_a[0];
|
||
string2 = "";
|
||
}
|
||
this.a(i2, (String)object, string, string2);
|
||
}
|
||
} else {
|
||
for (int i3 = 0; i3 < list.size(); ++i3) {
|
||
Object object = list.get(i3);
|
||
Object object3 = "";
|
||
if (i3 < stringArray.length && ((String)(object3 = stringArray[i3])).length() > 50) {
|
||
object3 = "<22><><A1><AD>" + ((String)object3).substring(((String)object3).length() - 50);
|
||
}
|
||
String string = object.getClass().getTypeName();
|
||
string = string.substring(string.lastIndexOf(".") + 1);
|
||
this.a(i3, (String)object3, string, object.toString());
|
||
}
|
||
}
|
||
}
|
||
|
||
private void a(int n2, String string, String string2, String string3) {
|
||
CellConstraints cellConstraints = new CellConstraints();
|
||
if (string != null) {
|
||
JPanel jPanel = new JPanel(new FlowLayout(2));
|
||
jPanel.setSize(new Dimension(-1, Integer.MAX_VALUE));
|
||
jPanel.add(new JLabel(string, 4));
|
||
this.b.add((Component)jPanel, cellConstraints.xy(2, n2 + 1));
|
||
}
|
||
if (string3 != null) {
|
||
this.b.add((Component)new JTextField(string3), cellConstraints.xy(4, n2 + 1));
|
||
this.b.add(this.a(string2), cellConstraints.xy(5, n2 + 1));
|
||
}
|
||
}
|
||
|
||
private JComboBox<String> a(String string) {
|
||
ComboBox comboBox = new ComboBox();
|
||
comboBox.addItem((Object)"--<2D><>ѡ<EB><D1A1>--");
|
||
for (String string2 : g.var_java_lang_String_arr_a) {
|
||
comboBox.addItem((Object)string2);
|
||
}
|
||
if (StringUtils.isNotBlank((CharSequence)string)) {
|
||
comboBox.setSelectedItem((Object)string);
|
||
}
|
||
return comboBox;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(5, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jScrollPane.setViewportView(jPanel2);
|
||
this.b = new JPanel();
|
||
this.b.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel2.add((Component)this.b, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel b() {
|
||
return this.b;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public BslErrorMod cn_com_pism_batslog_model_BslErrorMod_a() {
|
||
return this.var_cn_com_pism_batslog_model_BslErrorMod_a;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.b = jPanel;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(BslErrorMod bslErrorMod) {
|
||
this.var_cn_com_pism_batslog_model_BslErrorMod_a = bslErrorMod;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof c)) {
|
||
return false;
|
||
}
|
||
c c2 = (c)object;
|
||
if (!c2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = c2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel = this.b();
|
||
JPanel jPanel2 = c2.b();
|
||
if (jPanel == null ? jPanel2 != null : !jPanel.equals(jPanel2)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = c2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
BslErrorMod bslErrorMod = this.cn_com_pism_batslog_model_BslErrorMod_a();
|
||
BslErrorMod bslErrorMod2 = c2.cn_com_pism_batslog_model_BslErrorMod_a();
|
||
return !(bslErrorMod == null ? bslErrorMod2 != null : !((Object)bslErrorMod).equals(bslErrorMod2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof c;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JPanel jPanel = this.b();
|
||
n3 = n3 * 59 + (jPanel == null ? 43 : jPanel.hashCode());
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
BslErrorMod bslErrorMod = this.cn_com_pism_batslog_model_BslErrorMod_a();
|
||
n3 = n3 * 59 + (bslErrorMod == null ? 43 : ((Object)bslErrorMod).hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "SqlAndParamsProcessPanel(root=" + (JPanel)this.javax_swing_JComponent_a() + ", sqlContentLine=" + this.b() + ", project=" + this.com_intellij_openapi_project_Project_a() + ", bslErrorMod=" + this.cn_com_pism_batslog_model_BslErrorMod_a() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.CommonDataKeys
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.LanguageTextField
|
||
* com.intellij.ui.components.JBScrollPane
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
*/
|
||
package cn.com.pism.batslog.e.a;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.LanguageTextField;
|
||
import com.intellij.ui.components.JBScrollPane;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
|
||
public class d {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel b;
|
||
private LanguageTextField var_com_intellij_ui_LanguageTextField_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public d(Project project, String string) {
|
||
this.c();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_intellij_ui_LanguageTextField_a = cn.com.pism.batslog.f.a.a(Language.findLanguageByID((String)"SQL"), project, string);
|
||
this.b.add((Component)this.var_com_intellij_ui_LanguageTextField_a);
|
||
}
|
||
|
||
private static AnAction com_intellij_openapi_actionSystem_AnAction_a() {
|
||
String string = "ReformatCode";
|
||
return ActionManager.getInstance().getAction("ReformatCode");
|
||
}
|
||
|
||
public void void_a() {
|
||
AnAction anAction = d.com_intellij_openapi_actionSystem_AnAction_a();
|
||
AnActionEvent anActionEvent = AnActionEvent.createFromAnAction((AnAction)anAction, null, (String)"", string -> {
|
||
if (CommonDataKeys.PROJECT.is(string)) {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
if (CommonDataKeys.EDITOR.is(string)) {
|
||
return this.var_com_intellij_ui_LanguageTextField_a.getEditor();
|
||
}
|
||
return null;
|
||
});
|
||
ApplicationManager.getApplication().invokeLater(() -> anAction.actionPerformed(anActionEvent));
|
||
}
|
||
|
||
private void void_b() {
|
||
}
|
||
|
||
private void c() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, "Center");
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, "North");
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout(new BorderLayout(0, 0));
|
||
jPanel.add((Component)jPanel3, "Center");
|
||
JBScrollPane jBScrollPane = new JBScrollPane();
|
||
jPanel3.add((Component)jBScrollPane, "Center");
|
||
this.b = new JPanel();
|
||
this.b.setLayout(new BorderLayout(0, 0));
|
||
jBScrollPane.setViewportView((Component)this.b);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_b() {
|
||
return this.b;
|
||
}
|
||
|
||
public LanguageTextField com_intellij_ui_LanguageTextField_a() {
|
||
return this.var_com_intellij_ui_LanguageTextField_a;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.b = jPanel;
|
||
}
|
||
|
||
public void a(LanguageTextField languageTextField) {
|
||
this.var_com_intellij_ui_LanguageTextField_a = languageTextField;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void void_a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof d)) {
|
||
return false;
|
||
}
|
||
d d2 = (d)object;
|
||
if (!d2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = d2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel = this.javax_swing_JPanel_b();
|
||
JPanel jPanel2 = d2.javax_swing_JPanel_b();
|
||
if (jPanel == null ? jPanel2 != null : !jPanel.equals(jPanel2)) {
|
||
return false;
|
||
}
|
||
LanguageTextField languageTextField = this.com_intellij_ui_LanguageTextField_a();
|
||
LanguageTextField languageTextField2 = d2.com_intellij_ui_LanguageTextField_a();
|
||
if (languageTextField == null ? languageTextField2 != null : !languageTextField.equals(languageTextField2)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = d2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
String string = this.java_lang_String_a();
|
||
String string2 = d2.java_lang_String_a();
|
||
return !(string == null ? string2 != null : !string.equals(string2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof d;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JPanel jPanel = this.javax_swing_JPanel_b();
|
||
n3 = n3 * 59 + (jPanel == null ? 43 : jPanel.hashCode());
|
||
LanguageTextField languageTextField = this.com_intellij_ui_LanguageTextField_a();
|
||
n3 = n3 * 59 + (languageTextField == null ? 43 : languageTextField.hashCode());
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
String string = this.java_lang_String_a();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "SqlEditorPanel(root=" + (JPanel)this.javax_swing_JComponent_a() + ", content=" + this.javax_swing_JPanel_b() + ", editorTextField=" + this.com_intellij_ui_LanguageTextField_a() + ", project=" + this.com_intellij_openapi_project_Project_a() + ", str=" + this.java_lang_String_a() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
*/
|
||
package cn.com.pism.batslog.e.a;
|
||
|
||
import cn.com.pism.batslog.e.a.b;
|
||
import cn.com.pism.batslog.e.a.c;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
|
||
public class e {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel b;
|
||
private JPanel c;
|
||
private b var_cn_com_pism_batslog_e_a_b_a;
|
||
|
||
public e(Project project, BslErrorMod bslErrorMod) {
|
||
b b2;
|
||
this.void_b();
|
||
this.var_cn_com_pism_batslog_e_a_b_a = b2 = new b(project, bslErrorMod);
|
||
this.b.add(b2.javax_swing_JComponent_a());
|
||
c c2 = new c(project, bslErrorMod);
|
||
this.c.add(c2.javax_swing_JComponent_a());
|
||
}
|
||
|
||
public void void_a() {
|
||
this.var_cn_com_pism_batslog_e_a_b_a.void_a();
|
||
}
|
||
|
||
private void void_b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.b = new JPanel();
|
||
this.b.setLayout(new BorderLayout(0, 0));
|
||
jPanel.add((Component)this.b, "North");
|
||
this.c = new JPanel();
|
||
this.c.setLayout(new BorderLayout(0, 0));
|
||
jPanel.add((Component)this.c, "Center");
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_b() {
|
||
return this.b;
|
||
}
|
||
|
||
public JPanel c() {
|
||
return this.c;
|
||
}
|
||
|
||
public b cn_com_pism_batslog_e_a_b_a() {
|
||
return this.var_cn_com_pism_batslog_e_a_b_a;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.b = jPanel;
|
||
}
|
||
|
||
public void c(JPanel jPanel) {
|
||
this.c = jPanel;
|
||
}
|
||
|
||
public void a(b b2) {
|
||
this.var_cn_com_pism_batslog_e_a_b_a = b2;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof e)) {
|
||
return false;
|
||
}
|
||
e e2 = (e)object;
|
||
if (!e2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = e2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel = this.javax_swing_JPanel_b();
|
||
JPanel jPanel2 = e2.javax_swing_JPanel_b();
|
||
if (jPanel == null ? jPanel2 != null : !jPanel.equals(jPanel2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel3 = this.c();
|
||
JPanel jPanel4 = e2.c();
|
||
if (jPanel3 == null ? jPanel4 != null : !jPanel3.equals(jPanel4)) {
|
||
return false;
|
||
}
|
||
b b2 = this.cn_com_pism_batslog_e_a_b_a();
|
||
b b3 = e2.cn_com_pism_batslog_e_a_b_a();
|
||
return !(b2 == null ? b3 != null : !((Object)b2).equals(b3));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof e;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JPanel jPanel = this.javax_swing_JPanel_b();
|
||
n3 = n3 * 59 + (jPanel == null ? 43 : jPanel.hashCode());
|
||
JPanel jPanel2 = this.c();
|
||
n3 = n3 * 59 + (jPanel2 == null ? 43 : jPanel2.hashCode());
|
||
b b2 = this.cn_com_pism_batslog_e_a_b_a();
|
||
n3 = n3 * 59 + (b2 == null ? 43 : ((Object)b2).hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "SqlErrorProcessPanel(root=" + (JPanel)this.javax_swing_JComponent_a() + ", first=" + this.javax_swing_JPanel_b() + ", second=" + this.c() + ", sqlAndParamsPanel=" + this.cn_com_pism_batslog_e_a_b_a() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.icons.AllIcons$Debugger
|
||
* com.intellij.icons.AllIcons$General
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.table.JBTable
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import cn.com.pism.batslog.e.d;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.table.JBTable;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.table.DefaultTableModel;
|
||
import javax.swing.table.TableModel;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JBTable var_com_intellij_ui_table_JBTable_a;
|
||
private JPanel b;
|
||
|
||
public c(Project project) {
|
||
this.void_a();
|
||
this.a(project);
|
||
DefaultActionGroup defaultActionGroup = new DefaultActionGroup();
|
||
b b2 = new b(project, this.var_com_intellij_ui_table_JBTable_a, cn.com.pism.batslog.a.a("batslog.action.delete", new Object[0]), AllIcons.General.Remove);
|
||
defaultActionGroup.add((AnAction)b2);
|
||
defaultActionGroup.add((AnAction)new c(project, this.var_com_intellij_ui_table_JBTable_a, cn.com.pism.batslog.a.a("batslog.action.viewAndProcess", new Object[0]), AllIcons.Debugger.AttachToProcess));
|
||
defaultActionGroup.addSeparator();
|
||
defaultActionGroup.add((AnAction)new a(project, this.var_com_intellij_ui_table_JBTable_a, cn.com.pism.batslog.a.a("batslog.action.console.clear", new Object[0]), AllIcons.Actions.GC));
|
||
ActionToolbar actionToolbar = cn.com.pism.batslog.f.b.a("ToolwindowContent", true, defaultActionGroup);
|
||
this.b.add(actionToolbar.getComponent());
|
||
}
|
||
|
||
private void a(Project project) {
|
||
DefaultTableModel defaultTableModel = cn.com.pism.batslog.f.a.h.get(project);
|
||
if (defaultTableModel == null) {
|
||
defaultTableModel = c.javax_swing_table_DefaultTableModel_a();
|
||
cn.com.pism.batslog.f.a.h.put(project, defaultTableModel);
|
||
}
|
||
this.var_com_intellij_ui_table_JBTable_a.setModel((TableModel)defaultTableModel);
|
||
}
|
||
|
||
@NotNull
|
||
public static DefaultTableModel javax_swing_table_DefaultTableModel_a() {
|
||
Object[] objectArray = new String[]{cn.com.pism.batslog.a.a("batslog.errorList.title.sql", new Object[0]), cn.com.pism.batslog.a.a("batslog.errorList.title.params", new Object[0]), cn.com.pism.batslog.a.a("batslog.errorList.title.time", new Object[0]), cn.com.pism.batslog.a.a("batslog.errorList.title.errorMsg", new Object[0])};
|
||
return new DefaultTableModel(null, objectArray){
|
||
|
||
@Override
|
||
public boolean isCellEditable(int n2, int n3) {
|
||
return false;
|
||
}
|
||
};
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.b = new JPanel();
|
||
this.b.setLayout(new BorderLayout(0, 0));
|
||
jPanel.add((Component)this.b, "North");
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, "Center");
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel2.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
this.var_com_intellij_ui_table_JBTable_a = new JBTable();
|
||
jScrollPane.setViewportView((Component)this.var_com_intellij_ui_table_JBTable_a);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JBTable com_intellij_ui_table_JBTable_a() {
|
||
return this.var_com_intellij_ui_table_JBTable_a;
|
||
}
|
||
|
||
public JPanel b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void a(JBTable jBTable) {
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.b = jPanel;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof c)) {
|
||
return false;
|
||
}
|
||
c c2 = (c)object;
|
||
if (!c2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = c2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
JBTable jBTable2 = c2.com_intellij_ui_table_JBTable_a();
|
||
if (jBTable == null ? jBTable2 != null : !jBTable.equals(jBTable2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel = this.b();
|
||
JPanel jPanel2 = c2.b();
|
||
return !(jPanel == null ? jPanel2 != null : !jPanel.equals(jPanel2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof c;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
n3 = n3 * 59 + (jBTable == null ? 43 : jBTable.hashCode());
|
||
JPanel jPanel = this.b();
|
||
n3 = n3 * 59 + (jPanel == null ? 43 : jPanel.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "ErrorListPanel(root=" + (JPanel)this.javax_swing_JComponent_a() + ", errorList=" + this.com_intellij_ui_table_JBTable_a() + ", toolPanel=" + this.b() + ")";
|
||
}
|
||
|
||
public static class b
|
||
extends com.ccnode.codegenerator.a.b {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private JBTable var_com_intellij_ui_table_JBTable_a;
|
||
|
||
public b(@Nullable Project project, @Nullable JBTable jBTable, @Nullable String string, @Nullable Icon icon) {
|
||
super(string, "", icon);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
int[] nArray = this.var_com_intellij_ui_table_JBTable_a.getSelectedRows();
|
||
DefaultTableModel defaultTableModel = (DefaultTableModel)this.var_com_intellij_ui_table_JBTable_a.getModel();
|
||
for (int i2 = nArray.length - 1; i2 >= 0; --i2) {
|
||
defaultTableModel.removeRow(nArray[i2]);
|
||
}
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
super.update(anActionEvent);
|
||
boolean bl = this.var_com_intellij_ui_table_JBTable_a.getSelectedRows().length > 0;
|
||
anActionEvent.getPresentation().setEnabled(bl);
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof b)) {
|
||
return false;
|
||
}
|
||
b b2 = (b)((Object)object);
|
||
if (!b2.a((Object)this)) {
|
||
return false;
|
||
}
|
||
if (!super.equals(object)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = b2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
JBTable jBTable2 = b2.com_intellij_ui_table_JBTable_a();
|
||
return !(jBTable == null ? jBTable2 != null : !jBTable.equals(jBTable2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof b;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = super.hashCode();
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
n3 = n3 * 59 + (jBTable == null ? 43 : jBTable.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public JBTable com_intellij_ui_table_JBTable_a() {
|
||
return this.var_com_intellij_ui_table_JBTable_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(JBTable jBTable) {
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public String toString() {
|
||
return "ErrorListPanel.MyDeleteRowAction(project=" + this.com_intellij_openapi_project_Project_a() + ", table=" + this.com_intellij_ui_table_JBTable_a() + ")";
|
||
}
|
||
}
|
||
|
||
public static class c
|
||
extends com.ccnode.codegenerator.a.b {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private JBTable var_com_intellij_ui_table_JBTable_a;
|
||
|
||
public c(@Nullable Project project, @Nullable JBTable jBTable, @Nullable String string, @Nullable Icon icon) {
|
||
super(string, "", icon);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
int n2 = this.var_com_intellij_ui_table_JBTable_a.getSelectedRow();
|
||
int n3 = this.var_com_intellij_ui_table_JBTable_a.getColumnCount();
|
||
DefaultTableModel defaultTableModel = (DefaultTableModel)this.var_com_intellij_ui_table_JBTable_a.getModel();
|
||
Object[] objectArray = new Object[n3];
|
||
for (int i2 = 0; i2 < n3; ++i2) {
|
||
objectArray[i2] = defaultTableModel.getValueAt(n2, i2);
|
||
}
|
||
BslErrorMod bslErrorMod = new BslErrorMod().toMod(objectArray);
|
||
new d(this.var_com_intellij_openapi_project_Project_a, bslErrorMod);
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
super.update(anActionEvent);
|
||
boolean bl = this.var_com_intellij_ui_table_JBTable_a.getSelectedRows().length == 1;
|
||
anActionEvent.getPresentation().setEnabled(bl);
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof c)) {
|
||
return false;
|
||
}
|
||
c c2 = (c)((Object)object);
|
||
if (!c2.a((Object)this)) {
|
||
return false;
|
||
}
|
||
if (!super.equals(object)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = c2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
JBTable jBTable2 = c2.com_intellij_ui_table_JBTable_a();
|
||
return !(jBTable == null ? jBTable2 != null : !jBTable.equals(jBTable2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof c;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = super.hashCode();
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
n3 = n3 * 59 + (jBTable == null ? 43 : jBTable.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public JBTable com_intellij_ui_table_JBTable_a() {
|
||
return this.var_com_intellij_ui_table_JBTable_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(JBTable jBTable) {
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public String toString() {
|
||
return "ErrorListPanel.MyProcessAction(project=" + this.com_intellij_openapi_project_Project_a() + ", table=" + this.com_intellij_ui_table_JBTable_a() + ")";
|
||
}
|
||
}
|
||
|
||
public static class a
|
||
extends com.ccnode.codegenerator.a.b {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private JBTable var_com_intellij_ui_table_JBTable_a;
|
||
|
||
public a(@Nullable Project project, @Nullable JBTable jBTable, @Nullable String string, @Nullable Icon icon) {
|
||
super(string, "", icon);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
DefaultTableModel defaultTableModel = (DefaultTableModel)this.var_com_intellij_ui_table_JBTable_a.getModel();
|
||
int n2 = defaultTableModel.getRowCount();
|
||
for (int i2 = n2 - 1; i2 >= 0; --i2) {
|
||
defaultTableModel.removeRow(i2);
|
||
}
|
||
com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(this.var_com_intellij_openapi_project_Project_a).a().clear();
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
super.update(anActionEvent);
|
||
boolean bl = this.var_com_intellij_ui_table_JBTable_a.getModel().getRowCount() > 0;
|
||
anActionEvent.getPresentation().setEnabled(bl);
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof a)) {
|
||
return false;
|
||
}
|
||
a a2 = (a)((Object)object);
|
||
if (!a2.a((Object)this)) {
|
||
return false;
|
||
}
|
||
if (!super.equals(object)) {
|
||
return false;
|
||
}
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
Project project2 = a2.com_intellij_openapi_project_Project_a();
|
||
if (project == null ? project2 != null : !project.equals(project2)) {
|
||
return false;
|
||
}
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
JBTable jBTable2 = a2.com_intellij_ui_table_JBTable_a();
|
||
return !(jBTable == null ? jBTable2 != null : !jBTable.equals(jBTable2));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof a;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = super.hashCode();
|
||
Project project = this.com_intellij_openapi_project_Project_a();
|
||
n3 = n3 * 59 + (project == null ? 43 : project.hashCode());
|
||
JBTable jBTable = this.com_intellij_ui_table_JBTable_a();
|
||
n3 = n3 * 59 + (jBTable == null ? 43 : jBTable.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public JBTable com_intellij_ui_table_JBTable_a() {
|
||
return this.var_com_intellij_ui_table_JBTable_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(JBTable jBTable) {
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
}
|
||
|
||
public String toString() {
|
||
return "ErrorListPanel.MyClearAllAction(project=" + this.com_intellij_openapi_project_Project_a() + ", table=" + this.com_intellij_ui_table_JBTable_a() + ")";
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.util.DimensionService
|
||
* com.intellij.ui.JBSplitter
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import cn.com.pism.batslog.e.a.e;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.util.DimensionService;
|
||
import com.intellij.ui.JBSplitter;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d
|
||
extends DialogWrapper {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private cn.com.pism.batslog.e.a.d var_cn_com_pism_batslog_e_a_d_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
e var_cn_com_pism_batslog_e_a_e_a;
|
||
private static final String var_java_lang_String_a = "#cn.com.pism.batslog.ui.ErrorProcessDialog";
|
||
|
||
public d(@Nullable Project project) {
|
||
super(project);
|
||
this.void_a();
|
||
this.init();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
Dimension dimension = DimensionService.getInstance().getSize(var_java_lang_String_a, project);
|
||
if (dimension != null) {
|
||
this.var_javax_swing_JPanel_a.setPreferredSize(dimension);
|
||
}
|
||
this.setTitle("<22><><B4><ED><CE><F3><CF><EA>");
|
||
}
|
||
|
||
public d(Project project, BslErrorMod bslErrorMod) {
|
||
this(project);
|
||
e e2;
|
||
this.var_cn_com_pism_batslog_e_a_e_a = e2 = new e(project, bslErrorMod);
|
||
cn.com.pism.batslog.e.a.d d2 = new cn.com.pism.batslog.e.a.d(project, bslErrorMod.getSql());
|
||
JBSplitter jBSplitter = new JBSplitter(false, 0.7f);
|
||
jBSplitter.setFirstComponent(e2.javax_swing_JComponent_a());
|
||
jBSplitter.setSecondComponent(d2.javax_swing_JComponent_a());
|
||
this.var_javax_swing_JPanel_a.add((Component)jBSplitter);
|
||
this.var_cn_com_pism_batslog_e_a_d_a = d2;
|
||
this.show();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
Dimension dimension = this.getSize();
|
||
if (dimension != null) {
|
||
DimensionService.getInstance().setSize(var_java_lang_String_a, dimension, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public boolean isShowing() {
|
||
this.var_cn_com_pism_batslog_e_a_d_a.void_a();
|
||
this.var_cn_com_pism_batslog_e_a_e_a.void_a();
|
||
return super.isShowing();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.setMinimumSize(new Dimension(800, 600));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, "North");
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.icons.AllIcons$RunConfigurations
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.wm.ToolWindowAnchor
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import cn.com.pism.batslog.a;
|
||
import cn.com.pism.batslog.a.j;
|
||
import cn.com.pism.batslog.e.g;
|
||
import cn.com.pism.batslog.f.h;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.wm.ToolWindowAnchor;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.ArrayList;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
|
||
public class e {
|
||
private JPanel a;
|
||
private JPanel b;
|
||
private JPanel c;
|
||
private JPanel d;
|
||
|
||
public e(Project project) {
|
||
this.void_a();
|
||
this.a(project);
|
||
g g2 = new g(project, true);
|
||
g2.print(h.a("\n ____ _ _ \n | _ \\ | | | | \n | |_) | __ _| |_ ___| | ___ __ _ \n | _ < / _` | __/ __| | / _ \\ / _` |\n | |_) | (_| | |_\\__ \\ |___| (_) | (_| |\n |____/ \\__,_|\\__|___/______\\___/ \\__, |\n __/ |\n |___/ \n", project), ConsoleViewContentType.ERROR_OUTPUT);
|
||
cn.com.pism.batslog.f.a.c.put(project, g2);
|
||
}
|
||
|
||
public void a(Project project, g g2, boolean bl) {
|
||
JComponent jComponent = g2.getComponent();
|
||
this.b(project, g2, bl);
|
||
this.b.add(jComponent);
|
||
this.b.setBorder(null);
|
||
}
|
||
|
||
private void b(Project project, g g2, boolean bl) {
|
||
ActionToolbar actionToolbar = g2.a("unknown", !bl, cn.com.pism.batslog.f.a.var_java_util_Map_com_intellij_openapi_project_Project,_com_intellij_openapi_actionSystem_AnAction_arr__a.get(project));
|
||
if (this.d == null) {
|
||
g2.a(g2.com_intellij_openapi_actionSystem_ActionToolbar_a().getActions());
|
||
}
|
||
this.d = new JPanel(new BorderLayout());
|
||
this.d.add(actionToolbar.getComponent());
|
||
if (this.c.getComponents().length >= 2) {
|
||
this.c.remove(1);
|
||
}
|
||
if (bl) {
|
||
this.c.add((Component)this.d, "West");
|
||
} else {
|
||
this.c.add((Component)this.d, "North");
|
||
}
|
||
this.d.setVisible(true);
|
||
this.c.revalidate();
|
||
this.c.repaint();
|
||
}
|
||
|
||
private void a(Project project) {
|
||
cn.com.pism.batslog.a.g g2 = new cn.com.pism.batslog.a.g(cn.com.pism.batslog.a.a("batslog.formatWindow", new Object[0]), cn.com.pism.batslog.a.a("batslog.formatWindow", new Object[0]), AllIcons.RunConfigurations.Applet);
|
||
j j2 = new j(cn.com.pism.batslog.a.a("start", new Object[0]), cn.com.pism.batslog.a.a("startSqlListener", new Object[0]), AllIcons.Actions.Execute, () -> this.b(project, (g)cn.com.pism.batslog.f.a.c.get(project), ToolWindowAnchor.BOTTOM.equals(cn.com.pism.batslog.f.a.var_com_intellij_openapi_wm_ex_ToolWindowEx_a.getAnchor())));
|
||
cn.com.pism.batslog.a.a a2 = new cn.com.pism.batslog.a.a("Beauty", "Beauty", icons.a.c, project);
|
||
ArrayList<Object> arrayList = new ArrayList<Object>();
|
||
arrayList.add((Object)j2);
|
||
arrayList.add((Object)g2);
|
||
arrayList.add((Object)a2);
|
||
cn.com.pism.batslog.f.a.var_java_util_Map_com_intellij_openapi_project_Project,_com_intellij_openapi_actionSystem_AnAction_arr__a.put(project, arrayList.toArray(new AnAction[0]));
|
||
}
|
||
|
||
private void void_a() {
|
||
this.a = new JPanel();
|
||
this.a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.c = new JPanel();
|
||
this.c.setLayout(new BorderLayout(0, 0));
|
||
this.a.add((Component)this.c, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.b = new JPanel();
|
||
this.b.setLayout(new BorderLayout(0, 0));
|
||
this.c.add((Component)this.b, "Center");
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public JPanel b() {
|
||
return this.b;
|
||
}
|
||
|
||
public JPanel c() {
|
||
return this.c;
|
||
}
|
||
|
||
public JPanel d() {
|
||
return this.d;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.a = jPanel;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.b = jPanel;
|
||
}
|
||
|
||
public void c(JPanel jPanel) {
|
||
this.c = jPanel;
|
||
}
|
||
|
||
public void d(JPanel jPanel) {
|
||
this.d = jPanel;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof e)) {
|
||
return false;
|
||
}
|
||
e e2 = (e)object;
|
||
if (!e2.a(this)) {
|
||
return false;
|
||
}
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
JComponent jComponent2 = e2.javax_swing_JComponent_a();
|
||
if (jComponent == null ? jComponent2 != null : !jComponent.equals(jComponent2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel = this.b();
|
||
JPanel jPanel2 = e2.b();
|
||
if (jPanel == null ? jPanel2 != null : !jPanel.equals(jPanel2)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel3 = this.c();
|
||
JPanel jPanel4 = e2.c();
|
||
if (jPanel3 == null ? jPanel4 != null : !jPanel3.equals(jPanel4)) {
|
||
return false;
|
||
}
|
||
JPanel jPanel5 = this.d();
|
||
JPanel jPanel6 = e2.d();
|
||
return !(jPanel5 == null ? jPanel6 != null : !jPanel5.equals(jPanel6));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof e;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
JComponent jComponent = this.javax_swing_JComponent_a();
|
||
n3 = n3 * 59 + (jComponent == null ? 43 : jComponent.hashCode());
|
||
JPanel jPanel = this.b();
|
||
n3 = n3 * 59 + (jPanel == null ? 43 : jPanel.hashCode());
|
||
JPanel jPanel2 = this.c();
|
||
n3 = n3 * 59 + (jPanel2 == null ? 43 : jPanel2.hashCode());
|
||
JPanel jPanel3 = this.d();
|
||
n3 = n3 * 59 + (jPanel3 == null ? 43 : jPanel3.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "FormatConsole(root=" + (JPanel)this.javax_swing_JComponent_a() + ", sqlPanel=" + this.b() + ", parentPanel=" + this.c() + ", toolBar=" + this.d() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.impl.ConsoleViewImpl
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.actionSystem.ActionGroup
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.fileTypes.PlainTextLanguage
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.project.ProjectManager
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.util.DimensionService
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import cn.com.pism.batslog.a;
|
||
import cn.com.pism.batslog.e.g;
|
||
import cn.com.pism.batslog.f.e;
|
||
import cn.com.pism.batslog.f.h;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.execution.impl.ConsoleViewImpl;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.fileTypes.PlainTextLanguage;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.project.ProjectManager;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.util.DimensionService;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class f
|
||
extends DialogWrapper {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private JPanel var_javax_swing_JPanel_d;
|
||
private JPanel e;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JButton var_javax_swing_JButton_b;
|
||
private JButton var_javax_swing_JButton_c;
|
||
private JButton var_javax_swing_JButton_d;
|
||
private g var_cn_com_pism_batslog_e_g_a;
|
||
private Editor var_com_intellij_openapi_editor_Editor_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static final String var_java_lang_String_a = "#cn.com.pism.batslog.ui.FormatWindow";
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
protected f(@Nullable Project project) {
|
||
super(project);
|
||
this.void_b();
|
||
this.init();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.d(project);
|
||
this.setOKButtonTooltip(cn.com.pism.batslog.a.a("printSqlToConsole", new Object[0]));
|
||
this.c(project);
|
||
this.show();
|
||
}
|
||
|
||
private void c(@Nullable Project project) {
|
||
this.var_javax_swing_JButton_a.addActionListener(actionEvent -> this.a(project, this.var_com_intellij_openapi_editor_Editor_a.getDocument().getText(), true, this.var_cn_com_pism_batslog_e_g_a));
|
||
this.var_javax_swing_JButton_b.addActionListener(actionEvent -> {
|
||
this.var_cn_com_pism_batslog_e_g_a.clear();
|
||
this.a(project, this.var_com_intellij_openapi_editor_Editor_a.getDocument().getText(), true, this.var_cn_com_pism_batslog_e_g_a);
|
||
});
|
||
this.var_javax_swing_JButton_c.addActionListener(actionEvent -> {
|
||
this.a(project, this.var_com_intellij_openapi_editor_Editor_a.getDocument().getText(), true, this.var_cn_com_pism_batslog_e_g_a);
|
||
this.b(this.var_com_intellij_openapi_editor_Editor_a);
|
||
});
|
||
this.var_javax_swing_JButton_d.addActionListener(actionEvent -> {
|
||
this.b(this.var_com_intellij_openapi_editor_Editor_a);
|
||
this.var_cn_com_pism_batslog_e_g_a.clear();
|
||
});
|
||
}
|
||
|
||
private void a(@Nullable Project project, String string, boolean bl, ConsoleViewImpl consoleViewImpl) {
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
cn.com.pism.batslog.f.g.a(string, project, bl, consoleViewImpl, null);
|
||
}
|
||
}
|
||
|
||
private void d(@Nullable Project project) {
|
||
Editor editor;
|
||
Project project2 = ProjectManager.getInstance().getDefaultProject();
|
||
this.var_com_intellij_openapi_editor_Editor_a = editor = cn.com.pism.batslog.f.e.a(project, (Language)PlainTextLanguage.INSTANCE, "", false);
|
||
ArrayList<AnAction> arrayList = new ArrayList<AnAction>(this.a(editor));
|
||
ActionToolbar actionToolbar = this.a("unknown", true, arrayList.toArray(new AnAction[0]));
|
||
this.e.add(actionToolbar.getComponent());
|
||
this.var_javax_swing_JPanel_b.add(editor.getComponent());
|
||
this.var_cn_com_pism_batslog_e_g_a = new g(project2, true);
|
||
JComponent jComponent = this.var_cn_com_pism_batslog_e_g_a.getComponent();
|
||
ArrayList<AnAction> arrayList2 = new ArrayList<AnAction>();
|
||
arrayList2.add(new b(cn.com.pism.batslog.a.a("batslog.action.copyAllSQL", new Object[0]), cn.com.pism.batslog.a.a("batslog.action.copyAllSQL", new Object[0]), icons.a.b){
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
String string = f.this.var_cn_com_pism_batslog_e_g_a.getText();
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
cn.com.pism.batslog.f.a.a(string);
|
||
}
|
||
}
|
||
});
|
||
ActionToolbar actionToolbar2 = this.var_cn_com_pism_batslog_e_g_a.a("unknown", true, arrayList2);
|
||
this.var_cn_com_pism_batslog_e_g_a.a(this.var_cn_com_pism_batslog_e_g_a.com_intellij_openapi_actionSystem_ActionToolbar_a().getActions());
|
||
this.var_javax_swing_JPanel_d.add(actionToolbar2.getComponent());
|
||
this.var_javax_swing_JPanel_c.add(jComponent);
|
||
Dimension dimension = DimensionService.getInstance().getSize(var_java_lang_String_a, project);
|
||
if (dimension != null) {
|
||
this.var_javax_swing_JPanel_a.setPreferredSize(dimension);
|
||
} else {
|
||
this.setSize(1000, 800);
|
||
}
|
||
this.setTitle(h.a("BatsLog", project));
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public static void a(Project project) {
|
||
new f(project);
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
String string = this.var_com_intellij_openapi_editor_Editor_a.getDocument().getText();
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
this.a(this.var_com_intellij_openapi_project_Project_a, string, Boolean.TRUE, cn.com.pism.batslog.f.a.c.get(this.var_com_intellij_openapi_project_Project_a));
|
||
}
|
||
this.void_a();
|
||
super.doOKAction();
|
||
}
|
||
|
||
private void void_a() {
|
||
Dimension dimension = this.getSize();
|
||
if (dimension != null) {
|
||
DimensionService.getInstance().setSize(var_java_lang_String_a, dimension, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
}
|
||
|
||
public ActionToolbar a(String string, boolean bl, AnAction[] anActionArray) {
|
||
DefaultActionGroup defaultActionGroup = new DefaultActionGroup();
|
||
ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(string, (ActionGroup)defaultActionGroup, bl);
|
||
for (AnAction anAction : anActionArray) {
|
||
defaultActionGroup.add(anAction);
|
||
}
|
||
return actionToolbar;
|
||
}
|
||
|
||
public List<AnAction> a(Editor editor) {
|
||
ArrayList<AnAction> arrayList = new ArrayList<AnAction>();
|
||
b b2 = new b(this, cn.com.pism.batslog.a.a("batslog.action.console.clear", new Object[0]), cn.com.pism.batslog.a.a("batslog.action.formatForm.clearEditor", new Object[0]), AllIcons.Actions.GC, editor){
|
||
final /* synthetic */ Editor var_com_intellij_openapi_editor_Editor_a;
|
||
final /* synthetic */ f var_cn_com_pism_batslog_e_f_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_f_a = f2;
|
||
this.var_com_intellij_openapi_editor_Editor_a = editor;
|
||
super(string, string2, icon);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
this.var_cn_com_pism_batslog_e_f_a.b(this.var_com_intellij_openapi_editor_Editor_a);
|
||
}
|
||
};
|
||
b b3 = new b(this, cn.com.pism.batslog.a.a("batslog.action.copySQLToClipboard", new Object[0]), cn.com.pism.batslog.a.a("batslog.action.copySQLToClipboard", new Object[0]), icons.a.b, editor){
|
||
final /* synthetic */ Editor var_com_intellij_openapi_editor_Editor_a;
|
||
final /* synthetic */ f var_cn_com_pism_batslog_e_f_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_f_a = f2;
|
||
this.var_com_intellij_openapi_editor_Editor_a = editor;
|
||
super(string, string2, icon);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
cn.com.pism.batslog.f.a.a(anActionEvent, this.var_com_intellij_openapi_editor_Editor_a.getDocument().getText());
|
||
}
|
||
};
|
||
arrayList.add(b3);
|
||
arrayList.add(b2);
|
||
return arrayList;
|
||
}
|
||
|
||
private void b(Editor editor) {
|
||
Document document = editor.getDocument();
|
||
int n2 = document.getText().length();
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, () -> document.replaceString(0, n2, (CharSequence)""));
|
||
}
|
||
|
||
public void doCancelAction() {
|
||
this.void_a();
|
||
super.doCancelAction();
|
||
}
|
||
|
||
private void void_b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.setMinimumSize(new Dimension(800, 500));
|
||
this.var_javax_swing_JPanel_a.setPreferredSize(new Dimension(800, 500));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jScrollPane.setHorizontalScrollBarPolicy(30);
|
||
jScrollPane.setVerticalScrollBarPolicy(20);
|
||
jPanel2.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_b.setMinimumSize(new Dimension(350, -1));
|
||
this.var_javax_swing_JPanel_b.setPreferredSize(new Dimension(350, -1));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JPanel_b);
|
||
this.e = new JPanel();
|
||
this.e.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.e, "North");
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel3, new GridConstraints(0, 2, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JScrollPane jScrollPane2 = new JScrollPane();
|
||
jPanel3.add((Component)jScrollPane2, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_c.setMinimumSize(new Dimension(350, -1));
|
||
this.var_javax_swing_JPanel_c.setPreferredSize(new Dimension(350, -1));
|
||
jScrollPane2.setViewportView(this.var_javax_swing_JPanel_c);
|
||
this.var_javax_swing_JPanel_d = new JPanel();
|
||
this.var_javax_swing_JPanel_d.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_c.add((Component)this.var_javax_swing_JPanel_d, "North");
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout(new FlowLayout(1, 5, 5));
|
||
jPanel4.setAutoscrolls(false);
|
||
jPanel.add((Component)jPanel4, new GridConstraints(0, 1, 1, 1, 0, 3, 0, 3, new Dimension(60, -1), new Dimension(60, -1), new Dimension(60, -1), 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.var_javax_swing_JButton_a.setHorizontalTextPosition(0);
|
||
this.var_javax_swing_JButton_a.setMaximumSize(new Dimension(58, 38));
|
||
this.var_javax_swing_JButton_a.setMinimumSize(new Dimension(58, 38));
|
||
this.var_javax_swing_JButton_a.setPreferredSize(new Dimension(58, 38));
|
||
this.a(this.var_javax_swing_JButton_a, this.a("text/BatsLogBundle", "batslog.action.formatForm.formatButton"));
|
||
jPanel4.add(this.var_javax_swing_JButton_a);
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.var_javax_swing_JButton_b.setActionCommand("");
|
||
this.var_javax_swing_JButton_b.setHideActionText(false);
|
||
this.var_javax_swing_JButton_b.setHorizontalTextPosition(0);
|
||
this.var_javax_swing_JButton_b.setInheritsPopupMenu(false);
|
||
this.var_javax_swing_JButton_b.setLabel(this.a("text/BatsLogBundle", "batslog.action.formatForm.clearAndFormat"));
|
||
this.var_javax_swing_JButton_b.setMaximumSize(new Dimension(58, 60));
|
||
this.var_javax_swing_JButton_b.setMinimumSize(new Dimension(58, 60));
|
||
this.var_javax_swing_JButton_b.setOpaque(false);
|
||
this.var_javax_swing_JButton_b.setPreferredSize(new Dimension(58, 60));
|
||
this.var_javax_swing_JButton_b.setRequestFocusEnabled(true);
|
||
this.var_javax_swing_JButton_b.setRolloverEnabled(true);
|
||
this.a(this.var_javax_swing_JButton_b, this.a("text/BatsLogBundle", "batslog.action.formatForm.clearAndFormat"));
|
||
this.var_javax_swing_JButton_b.setToolTipText(this.a("text/BatsLogBundle", "batslog.action.formatForm.clearAndFormatTips"));
|
||
this.var_javax_swing_JButton_b.setVerifyInputWhenFocusTarget(true);
|
||
this.var_javax_swing_JButton_b.setVerticalTextPosition(0);
|
||
jPanel4.add(this.var_javax_swing_JButton_b);
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.var_javax_swing_JButton_c.setMaximumSize(new Dimension(58, 60));
|
||
this.var_javax_swing_JButton_c.setMinimumSize(new Dimension(58, 60));
|
||
this.var_javax_swing_JButton_c.setPreferredSize(new Dimension(58, 60));
|
||
this.a(this.var_javax_swing_JButton_c, this.a("text/BatsLogBundle", "batslog.action.formatForm.formatAndClear"));
|
||
this.var_javax_swing_JButton_c.setToolTipText(this.a("text/BatsLogBundle", "batslog.action.formatForm.formatAndClearTips"));
|
||
jPanel4.add(this.var_javax_swing_JButton_c);
|
||
this.var_javax_swing_JButton_d = new JButton();
|
||
this.var_javax_swing_JButton_d.setMaximumSize(new Dimension(58, 38));
|
||
this.var_javax_swing_JButton_d.setMinimumSize(new Dimension(58, 38));
|
||
this.var_javax_swing_JButton_d.setPreferredSize(new Dimension(58, 38));
|
||
this.a(this.var_javax_swing_JButton_d, this.a("text/BatsLogBundle", "batslog.action.console.clear"));
|
||
this.var_javax_swing_JButton_d.setToolTipText(this.a("text/BatsLogBundle", "batslog.action.formatForm.clearTips"));
|
||
jPanel4.add(this.var_javax_swing_JButton_d);
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_b() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_c() {
|
||
return this.var_javax_swing_JPanel_c;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_d() {
|
||
return this.var_javax_swing_JPanel_d;
|
||
}
|
||
|
||
public JPanel e() {
|
||
return this.e;
|
||
}
|
||
|
||
public JButton javax_swing_JButton_a() {
|
||
return this.var_javax_swing_JButton_a;
|
||
}
|
||
|
||
public JButton javax_swing_JButton_b() {
|
||
return this.var_javax_swing_JButton_b;
|
||
}
|
||
|
||
public JButton javax_swing_JButton_c() {
|
||
return this.var_javax_swing_JButton_c;
|
||
}
|
||
|
||
public JButton javax_swing_JButton_d() {
|
||
return this.var_javax_swing_JButton_d;
|
||
}
|
||
|
||
public g cn_com_pism_batslog_e_g_a() {
|
||
return this.var_cn_com_pism_batslog_e_g_a;
|
||
}
|
||
|
||
public Editor com_intellij_openapi_editor_Editor_a() {
|
||
return this.var_com_intellij_openapi_editor_Editor_a;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_b = jPanel;
|
||
}
|
||
|
||
public void c(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_c = jPanel;
|
||
}
|
||
|
||
public void d(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_d = jPanel;
|
||
}
|
||
|
||
public void e(JPanel jPanel) {
|
||
this.e = jPanel;
|
||
}
|
||
|
||
public void a(JButton jButton) {
|
||
this.var_javax_swing_JButton_a = jButton;
|
||
}
|
||
|
||
public void b(JButton jButton) {
|
||
this.var_javax_swing_JButton_b = jButton;
|
||
}
|
||
|
||
public void c(JButton jButton) {
|
||
this.var_javax_swing_JButton_c = jButton;
|
||
}
|
||
|
||
public void d(JButton jButton) {
|
||
this.var_javax_swing_JButton_d = jButton;
|
||
}
|
||
|
||
public void a(g g2) {
|
||
this.var_cn_com_pism_batslog_e_g_a = g2;
|
||
}
|
||
|
||
public void a(Editor editor) {
|
||
this.var_com_intellij_openapi_editor_Editor_a = editor;
|
||
}
|
||
|
||
public void b(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.ExecutionBundle
|
||
* com.intellij.execution.impl.ConsoleViewImpl
|
||
* com.intellij.execution.ui.ConsoleView
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.ide.CommonActionsManager
|
||
* com.intellij.ide.OccurenceNavigator
|
||
* com.intellij.openapi.actionSystem.ActionGroup
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
* com.intellij.openapi.actionSystem.LangDataKeys
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction
|
||
* com.intellij.openapi.editor.actions.ToggleUseSoftWrapsToolbarAction
|
||
* com.intellij.openapi.editor.event.EditorMouseEvent
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.editor.ex.EditorPopupHandler
|
||
* com.intellij.openapi.editor.impl.ContextMenuPopupHandler
|
||
* com.intellij.openapi.editor.impl.softwrap.SoftWrapAppliancePlaces
|
||
* com.intellij.openapi.project.DumbAwareAction
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import com.intellij.execution.ExecutionBundle;
|
||
import com.intellij.execution.impl.ConsoleViewImpl;
|
||
import com.intellij.execution.ui.ConsoleView;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.ide.CommonActionsManager;
|
||
import com.intellij.ide.OccurenceNavigator;
|
||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
import com.intellij.openapi.actionSystem.LangDataKeys;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction;
|
||
import com.intellij.openapi.editor.actions.ToggleUseSoftWrapsToolbarAction;
|
||
import com.intellij.openapi.editor.event.EditorMouseEvent;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.editor.ex.EditorPopupHandler;
|
||
import com.intellij.openapi.editor.impl.ContextMenuPopupHandler;
|
||
import com.intellij.openapi.editor.impl.softwrap.SoftWrapAppliancePlaces;
|
||
import com.intellij.openapi.project.DumbAwareAction;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class g
|
||
extends ConsoleViewImpl {
|
||
ActionToolbar a;
|
||
|
||
public g(@NotNull Project project, boolean bl) {
|
||
super(project, bl);
|
||
this.setBorder(null);
|
||
}
|
||
|
||
public void a(AnAction[] anActionArray) {
|
||
this.a(Arrays.asList(anActionArray));
|
||
}
|
||
|
||
public void a(List<AnAction> list) {
|
||
this.a(new ContextMenuPopupHandler(this, list){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ g var_cn_com_pism_batslog_e_g_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_g_a = g2;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
@NotNull
|
||
public ActionGroup getActionGroup(@NotNull EditorMouseEvent editorMouseEvent) {
|
||
return new ActionGroup(){
|
||
|
||
@NotNull
|
||
public AnAction[] getChildren(@Nullable AnActionEvent anActionEvent) {
|
||
return var_java_util_List_a.toArray(new AnAction[0]);
|
||
}
|
||
};
|
||
}
|
||
});
|
||
}
|
||
|
||
public void a(ContextMenuPopupHandler contextMenuPopupHandler) {
|
||
EditorEx editorEx = (EditorEx)this.getEditor();
|
||
editorEx.installPopupHandler((EditorPopupHandler)contextMenuPopupHandler);
|
||
}
|
||
|
||
public ActionToolbar a(String string, boolean bl, List<AnAction> list) {
|
||
AnAction[] anActionArray = this.com_intellij_openapi_actionSystem_AnAction_arr_a();
|
||
ActionManager actionManager = ActionManager.getInstance();
|
||
list.addAll(Arrays.asList(anActionArray));
|
||
DefaultActionGroup defaultActionGroup = new DefaultActionGroup();
|
||
ActionToolbar actionToolbar = actionManager.createActionToolbar(string, (ActionGroup)defaultActionGroup, bl);
|
||
for (AnAction anAction : list) {
|
||
defaultActionGroup.add(anAction);
|
||
}
|
||
this.a(actionToolbar);
|
||
return actionToolbar;
|
||
}
|
||
|
||
public ActionToolbar a(String string, boolean bl, AnAction[] anActionArray) {
|
||
return this.a(string, bl, new ArrayList<AnAction>(Arrays.asList(anActionArray)));
|
||
}
|
||
|
||
public ActionToolbar com_intellij_openapi_actionSystem_ActionToolbar_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(ActionToolbar actionToolbar) {
|
||
this.a = actionToolbar;
|
||
}
|
||
|
||
public AnAction[] com_intellij_openapi_actionSystem_AnAction_arr_a() {
|
||
CommonActionsManager commonActionsManager = CommonActionsManager.getInstance();
|
||
AnAction anAction = commonActionsManager.createPrevOccurenceAction((OccurenceNavigator)this);
|
||
anAction.getTemplatePresentation().setText(this.getPreviousOccurenceActionName());
|
||
AnAction anAction2 = commonActionsManager.createNextOccurenceAction((OccurenceNavigator)this);
|
||
anAction2.getTemplatePresentation().setText(this.getNextOccurenceActionName());
|
||
Editor editor = this.getEditor();
|
||
ToggleUseSoftWrapsToolbarAction toggleUseSoftWrapsToolbarAction = new ToggleUseSoftWrapsToolbarAction(this, SoftWrapAppliancePlaces.CONSOLE, editor){
|
||
final /* synthetic */ Editor var_com_intellij_openapi_editor_Editor_a;
|
||
final /* synthetic */ g var_cn_com_pism_batslog_e_g_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_g_a = g2;
|
||
this.var_com_intellij_openapi_editor_Editor_a = editor;
|
||
super(softWrapAppliancePlaces);
|
||
}
|
||
|
||
protected Editor getEditor(@NotNull AnActionEvent anActionEvent) {
|
||
return this.var_com_intellij_openapi_editor_Editor_a;
|
||
}
|
||
};
|
||
ScrollToTheEndToolbarAction scrollToTheEndToolbarAction = new ScrollToTheEndToolbarAction(editor);
|
||
ArrayList<Object> arrayList = new ArrayList<Object>();
|
||
arrayList.add(anAction);
|
||
arrayList.add(anAction2);
|
||
arrayList.add(toggleUseSoftWrapsToolbarAction);
|
||
arrayList.add(scrollToTheEndToolbarAction);
|
||
arrayList.add(ActionManager.getInstance().getAction("Print"));
|
||
arrayList.add((Object)new b((ConsoleView)this));
|
||
return arrayList.toArray(AnAction.EMPTY_ARRAY);
|
||
}
|
||
|
||
private static class b
|
||
extends a {
|
||
private final ConsoleView a;
|
||
|
||
b(@NotNull ConsoleView consoleView) {
|
||
this.a = consoleView;
|
||
}
|
||
|
||
@Override
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
boolean bl = this.a.getContentSize() > 0;
|
||
anActionEvent.getPresentation().setEnabled(bl);
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
cn.com.pism.batslog.f.a.var_int_a = 0;
|
||
this.a.clear();
|
||
}
|
||
}
|
||
|
||
public static class a
|
||
extends DumbAwareAction {
|
||
public a() {
|
||
super(ExecutionBundle.message((String)"clear.all.from.console.action.name", (Object[])new Object[0]), "Clear the contents of the console", AllIcons.Actions.GC);
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
ConsoleView consoleView = (ConsoleView)anActionEvent.getData(LangDataKeys.CONSOLE_VIEW);
|
||
boolean bl = consoleView != null && consoleView.getContentSize() > 0;
|
||
anActionEvent.getPresentation().setEnabled(bl);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
ConsoleView consoleView = (ConsoleView)anActionEvent.getData(LangDataKeys.CONSOLE_VIEW);
|
||
if (consoleView != null) {
|
||
consoleView.clear();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
public class h {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.Presentation
|
||
* com.intellij.openapi.actionSystem.impl.ActionButton
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.components.OnOffButton
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
import cn.com.pism.batslog.a.h;
|
||
import cn.com.pism.batslog.enums.DbType;
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.Presentation;
|
||
import com.intellij.openapi.actionSystem.impl.ActionButton;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.components.OnOffButton;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.lang.reflect.Method;
|
||
import java.nio.charset.StandardCharsets;
|
||
import java.util.Objects;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JList;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextField;
|
||
import javax.swing.ListCellRenderer;
|
||
import javax.swing.event.DocumentEvent;
|
||
import javax.swing.event.DocumentListener;
|
||
import javax.swing.text.BadLocationException;
|
||
import javax.swing.text.Document;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class i {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JTextField var_javax_swing_JTextField_c;
|
||
private JTextField var_javax_swing_JTextField_d;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private OnOffButton var_com_intellij_ui_components_OnOffButton_c;
|
||
private JTextField var_javax_swing_JTextField_e;
|
||
private OnOffButton var_com_intellij_ui_components_OnOffButton_d;
|
||
private JComboBox<String> var_javax_swing_JComboBox_java_lang_String__a;
|
||
private OnOffButton var_com_intellij_ui_components_OnOffButton_e;
|
||
private JLabel var_javax_swing_JLabel_a;
|
||
public OnOffButton var_com_intellij_ui_components_OnOffButton_a;
|
||
public JTextField var_javax_swing_JTextField_a;
|
||
public OnOffButton var_com_intellij_ui_components_OnOffButton_b;
|
||
public JTextField var_javax_swing_JTextField_b;
|
||
private MybatisCodeHelperLogSettingState var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
static final /* synthetic */ boolean var_boolean_a;
|
||
|
||
public i() {
|
||
this.void_c();
|
||
}
|
||
|
||
public i(Project project) {
|
||
this.void_c();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
this.void_a();
|
||
this.b(project);
|
||
String string = this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getSqlPrefix();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
string = "Preparing:";
|
||
}
|
||
this.var_javax_swing_JTextField_c.setText(string);
|
||
String string2 = this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getParamsPrefix();
|
||
if (StringUtils.isBlank((CharSequence)string2)) {
|
||
string2 = "Parameters:";
|
||
}
|
||
this.var_javax_swing_JTextField_d.setText(string2);
|
||
String string3 = this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getTimeFormat();
|
||
if (StringUtils.isBlank((CharSequence)string3)) {
|
||
string3 = "yyyy-MM-dd HH:mm:ss";
|
||
}
|
||
this.var_javax_swing_JTextField_e.setText(string3);
|
||
this.var_javax_swing_JTextField_b.setText(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getDeleteLogSuffix());
|
||
this.var_javax_swing_JTextField_a.setText(String.valueOf(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getRemoveDuplicateTimeInterval()));
|
||
this.c(project);
|
||
h h2 = new h(AllIcons.Actions.Rollback, "Preparing:", this.var_javax_swing_JTextField_c);
|
||
this.var_javax_swing_JPanel_b.add((Component)new ActionButton((AnAction)h2, new Presentation(), "unknown", ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE));
|
||
h h3 = new h(AllIcons.Actions.Rollback, "Parameters:", this.var_javax_swing_JTextField_d);
|
||
this.var_javax_swing_JPanel_c.add((Component)new ActionButton((AnAction)h3, new Presentation(), "unknown", ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE));
|
||
this.void_b();
|
||
}
|
||
|
||
private void void_a() {
|
||
String string = this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getEncoding();
|
||
this.var_com_intellij_openapi_project_Project_a.addItem("AUTO");
|
||
this.var_com_intellij_openapi_project_Project_a.addItem(StandardCharsets.UTF_8.displayName());
|
||
this.var_com_intellij_openapi_project_Project_a.addItem("GBK");
|
||
this.var_com_intellij_openapi_project_Project_a.addItem(StandardCharsets.ISO_8859_1.displayName());
|
||
this.var_com_intellij_openapi_project_Project_a.addItem(StandardCharsets.US_ASCII.displayName());
|
||
this.var_com_intellij_openapi_project_Project_a.addItem(StandardCharsets.UTF_16BE.displayName());
|
||
this.var_com_intellij_openapi_project_Project_a.addItem(StandardCharsets.UTF_16LE.displayName());
|
||
this.var_com_intellij_openapi_project_Project_a.addItem(StandardCharsets.UTF_16.displayName());
|
||
this.var_com_intellij_openapi_project_Project_a.setSelectedItem(string);
|
||
this.var_com_intellij_openapi_project_Project_a.addItemListener(itemEvent -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setEncoding((String)itemEvent.getItem()));
|
||
}
|
||
|
||
private void void_b() {
|
||
this.var_com_intellij_ui_components_OnOffButton_c.setSelected(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getAddTimestamp().booleanValue());
|
||
this.f(this.var_com_intellij_ui_components_OnOffButton_c);
|
||
this.var_com_intellij_ui_components_OnOffButton_b.setSelected(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getFormatSql().booleanValue());
|
||
this.f(this.var_com_intellij_ui_components_OnOffButton_b);
|
||
this.var_com_intellij_ui_components_OnOffButton_a.setSelected(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getAutoJumpOut().booleanValue());
|
||
this.var_com_intellij_ui_components_OnOffButton_d.setSelected(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getStartWithProject().booleanValue());
|
||
this.f(this.var_com_intellij_ui_components_OnOffButton_d);
|
||
this.var_com_intellij_ui_components_OnOffButton_e.setSelected(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getEnableMixedPrefix().booleanValue());
|
||
this.f(this.var_com_intellij_ui_components_OnOffButton_e);
|
||
}
|
||
|
||
private void f(OnOffButton onOffButton) {
|
||
onOffButton.setOffText(cn.com.pism.batslog.a.a("batslog.action.onOffButton.off", new Object[0]));
|
||
onOffButton.setOnText(cn.com.pism.batslog.a.a("batslog.action.onOffButton.on", new Object[0]));
|
||
}
|
||
|
||
private void b(Project project) {
|
||
cn.com.pism.batslog.e.a.a a2 = new cn.com.pism.batslog.e.a.a(project, cn.com.pism.batslog.f.a.a(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getKeyWordDefCol()), 16, 16, cn.com.pism.batslog.a.a("config.form.console.enabledKeyWordColor.tips", new Object[0]), color -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setKeyWordDefCol(new RgbColor(color.getRed(), color.getGreen(), color.getBlue())), bl -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setEnabledKeyWordDefCol((boolean)bl));
|
||
a2.b(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.isEnabledKeyWordDefCol());
|
||
}
|
||
|
||
private void c(Project project) {
|
||
this.var_javax_swing_JTextField_c.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ i var_cn_com_pism_batslog_e_i_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_i_a = i2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void insertUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.d(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void removeUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.d(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void changedUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.d(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_javax_swing_JTextField_b.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ i var_cn_com_pism_batslog_e_i_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_i_a = i2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void insertUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.a(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void removeUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.a(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void changedUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.a(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_javax_swing_JTextField_d.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ i var_cn_com_pism_batslog_e_i_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_i_a = i2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void insertUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.b(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void removeUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.b(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void changedUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.b(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_javax_swing_JTextField_e.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ i var_cn_com_pism_batslog_e_i_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_i_a = i2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void insertUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.c(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void removeUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.c(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void changedUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.c(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_javax_swing_JTextField_a.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ i var_cn_com_pism_batslog_e_i_a;
|
||
{
|
||
this.var_cn_com_pism_batslog_e_i_a = i2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void insertUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.e(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void removeUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.e(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@Override
|
||
public void changedUpdate(DocumentEvent documentEvent) {
|
||
this.var_cn_com_pism_batslog_e_i_a.e(documentEvent, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_com_intellij_ui_components_OnOffButton_c.addActionListener(actionEvent -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setAddTimestamp(this.var_com_intellij_ui_components_OnOffButton_c.isSelected()));
|
||
this.var_com_intellij_ui_components_OnOffButton_a.addActionListener(actionEvent -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setAutoJumpOut(this.var_com_intellij_ui_components_OnOffButton_a.isSelected()));
|
||
this.var_com_intellij_ui_components_OnOffButton_d.addActionListener(actionEvent -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setStartWithProject(this.var_com_intellij_ui_components_OnOffButton_d.isSelected()));
|
||
this.var_com_intellij_ui_components_OnOffButton_b.addActionListener(actionEvent -> this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setFormatSql(this.var_com_intellij_ui_components_OnOffButton_b.isSelected()));
|
||
this.var_com_intellij_ui_components_OnOffButton_e.addActionListener(actionEvent -> {
|
||
boolean bl = this.var_com_intellij_ui_components_OnOffButton_e.isSelected();
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setEnableMixedPrefix(bl);
|
||
this.var_javax_swing_JLabel_a.setVisible(bl);
|
||
});
|
||
}
|
||
|
||
private void a(DocumentEvent documentEvent, Project project) {
|
||
String string = this.a(documentEvent);
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setDeleteLogSuffix(string);
|
||
}
|
||
|
||
private void b(DocumentEvent documentEvent, Project project) {
|
||
String string = this.a(documentEvent);
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setParamsPrefix(string);
|
||
}
|
||
|
||
private void c(DocumentEvent documentEvent, Project project) {
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setTimeFormat(this.a(documentEvent));
|
||
}
|
||
|
||
private void d(DocumentEvent documentEvent, Project project) {
|
||
String string = this.a(documentEvent);
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setSqlPrefix(string);
|
||
}
|
||
|
||
private void e(DocumentEvent documentEvent, Project project) {
|
||
String string = this.a(documentEvent);
|
||
try {
|
||
if (!var_boolean_a && string == null) {
|
||
throw new AssertionError();
|
||
}
|
||
int n2 = Integer.parseInt(string.trim());
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setRemoveDuplicateTimeInterval(n2);
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
}
|
||
|
||
@Nullable
|
||
private String a(DocumentEvent documentEvent) {
|
||
String string = null;
|
||
try {
|
||
Document document = documentEvent.getDocument();
|
||
int n2 = document.getLength();
|
||
string = document.getText(0, n2);
|
||
}
|
||
catch (BadLocationException badLocationException) {
|
||
badLocationException.printStackTrace();
|
||
}
|
||
return string;
|
||
}
|
||
|
||
private void void_c() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel2.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, 0, 0, null, null));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jScrollPane.setViewportView(jPanel3);
|
||
Spacer spacer = new Spacer();
|
||
jPanel3.add((Component)spacer, new GridConstraints(2, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel4.setToolTipText("");
|
||
jPanel3.add((Component)jPanel4, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel4.setBorder(BorderFactory.createTitledBorder(null, this.a("text/BatsLogBundle", "config.form.label.basicConfig"), 0, 0, null, null));
|
||
Spacer spacer2 = new Spacer();
|
||
jPanel4.add((Component)spacer2, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
Spacer spacer3 = new Spacer();
|
||
jPanel4.add((Component)spacer3, new GridConstraints(5, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout((LayoutManager)new GridLayoutManager(1, 6, new Insets(0, 0, 5, 0), -1, -1));
|
||
jPanel4.add((Component)jPanel5, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel6 = new JPanel();
|
||
jPanel6.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel5.add((Component)jPanel6, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("text/BatsLogBundle", "sqlPrefix"));
|
||
jLabel.setToolTipText(this.a("text/BatsLogBundle", "sqlPrefix"));
|
||
jPanel6.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel7 = new JPanel();
|
||
jPanel7.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel5.add((Component)jPanel7, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
this.var_javax_swing_JTextField_c.setMargin(new Insets(2, 6, 2, 6));
|
||
jPanel7.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(0, 0, 1, 1, 8, 1, 4, 0, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
Spacer spacer4 = new Spacer();
|
||
jPanel5.add((Component)spacer4, new GridConstraints(0, 4, 1, 2, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_b.setAlignmentX(0.5f);
|
||
jPanel5.add((Component)this.var_javax_swing_JPanel_b, new GridConstraints(0, 2, 1, 1, 0, 3, 3, 3, new Dimension(22, -1), new Dimension(22, -1), new Dimension(22, -1), 0, false));
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.a(this.var_javax_swing_JLabel_a, this.a("text/BatsLogBundle", "multiple.are.separated.by.english.commas"));
|
||
this.var_javax_swing_JLabel_a.setVisible(false);
|
||
jPanel5.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(0, 3, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel8 = new JPanel();
|
||
jPanel8.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 5, 0), -1, -1));
|
||
jPanel4.add((Component)jPanel8, new GridConstraints(3, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel9 = new JPanel();
|
||
jPanel9.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel8.add((Component)jPanel9, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("text/BatsLogBundle", "paramsPrefix"));
|
||
jLabel2.setToolTipText(this.a("text/BatsLogBundle", "paramsPrefix"));
|
||
jPanel9.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer5 = new Spacer();
|
||
jPanel8.add((Component)spacer5, new GridConstraints(0, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel10 = new JPanel();
|
||
jPanel10.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel8.add((Component)jPanel10, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
this.var_javax_swing_JTextField_d = new JTextField();
|
||
jPanel10.add((Component)this.var_javax_swing_JTextField_d, new GridConstraints(0, 0, 1, 1, 8, 1, 4, 0, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout(new BorderLayout(0, 0));
|
||
jPanel8.add((Component)this.var_javax_swing_JPanel_c, new GridConstraints(0, 2, 1, 1, 0, 3, 3, 3, new Dimension(22, -1), new Dimension(22, -1), new Dimension(22, -1), 0, false));
|
||
JPanel jPanel11 = new JPanel();
|
||
jPanel11.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 5, 0), -1, -1));
|
||
jPanel4.add((Component)jPanel11, new GridConstraints(4, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel12 = new JPanel();
|
||
jPanel12.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel11.add((Component)jPanel12, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("text/BatsLogBundle", "config.form.basic.label.startWithProject"));
|
||
jLabel3.setToolTipText(this.a("text/BatsLogBundle", "config.form.basic.label.startWithProject"));
|
||
jPanel12.add((Component)jLabel3, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel13 = new JPanel();
|
||
jPanel13.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel11.add((Component)jPanel13, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
this.var_com_intellij_ui_components_OnOffButton_d = new OnOffButton();
|
||
this.var_com_intellij_ui_components_OnOffButton_d.setText("Button");
|
||
jPanel13.add((Component)this.var_com_intellij_ui_components_OnOffButton_d, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer6 = new Spacer();
|
||
jPanel13.add((Component)spacer6, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
Spacer spacer7 = new Spacer();
|
||
jPanel11.add((Component)spacer7, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel14 = new JPanel();
|
||
jPanel14.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 5, 0), -1, -1));
|
||
jPanel4.add((Component)jPanel14, new GridConstraints(2, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel15 = new JPanel();
|
||
jPanel15.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel14.add((Component)jPanel15, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
this.a(jLabel4, this.a("text/BatsLogBundle", "config.form.basic.enabledMixedPrefix.label"));
|
||
jLabel4.setToolTipText(this.a("text/BatsLogBundle", "config.form.basic.enabledMixedPrefix.label"));
|
||
jPanel15.add((Component)jLabel4, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel16 = new JPanel();
|
||
jPanel16.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel14.add((Component)jPanel16, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, new Dimension(300, -1), null, null, 0, false));
|
||
this.var_com_intellij_ui_components_OnOffButton_e = new OnOffButton();
|
||
jPanel16.add((Component)this.var_com_intellij_ui_components_OnOffButton_e, new GridConstraints(0, 0, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer8 = new Spacer();
|
||
jPanel16.add((Component)spacer8, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
jLabel5.setForeground(new Color(-4521984));
|
||
this.a(jLabel5, this.a("text/BatsLogBundle", "config.form.basic.enabledMixedPrefix.tips"));
|
||
jLabel5.setToolTipText(this.a("text/BatsLogBundle", "config.form.basic.enabledMixedPrefix.tips"));
|
||
jPanel16.add((Component)jLabel5, new GridConstraints(0, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer9 = new Spacer();
|
||
jPanel14.add((Component)spacer9, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel17 = new JPanel();
|
||
jPanel17.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel3.add((Component)jPanel17, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel17.setBorder(BorderFactory.createTitledBorder(null, this.a("text/BatsLogBundle", "config.form.label.consoleConfig"), 0, 0, null, null));
|
||
Spacer spacer10 = new Spacer();
|
||
jPanel17.add((Component)spacer10, new GridConstraints(3, 1, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel18 = new JPanel();
|
||
jPanel18.setLayout((LayoutManager)new GridLayoutManager(4, 3, new Insets(0, 0, 5, 0), -1, -1));
|
||
jPanel17.add((Component)jPanel18, new GridConstraints(2, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel19 = new JPanel();
|
||
jPanel19.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel18.add((Component)jPanel19, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
|
||
JLabel jLabel6 = new JLabel();
|
||
this.a(jLabel6, this.a("text/BatsLogBundle", "config.console.label.addtimestamp"));
|
||
jLabel6.setToolTipText(this.a("text/BatsLogBundle", "config.console.label.addtimestamp"));
|
||
jPanel19.add((Component)jLabel6, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel20 = new JPanel();
|
||
jPanel20.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel18.add((Component)jPanel20, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, new Dimension(300, -1), new Dimension(300, -1), new Dimension(300, -1), 0, false));
|
||
this.var_com_intellij_ui_components_OnOffButton_c = new OnOffButton();
|
||
this.var_com_intellij_ui_components_OnOffButton_c.setText("Button");
|
||
jPanel20.add((Component)this.var_com_intellij_ui_components_OnOffButton_c, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer11 = new Spacer();
|
||
jPanel20.add((Component)spacer11, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_e = new JTextField();
|
||
jPanel20.add((Component)this.var_javax_swing_JTextField_e, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
Spacer spacer12 = new Spacer();
|
||
jPanel18.add((Component)spacer12, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel7 = new JLabel();
|
||
this.a(jLabel7, this.a("i18n/i18n", "auto.show.console"));
|
||
jPanel18.add((Component)jLabel7, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_OnOffButton_a = new OnOffButton();
|
||
jPanel18.add((Component)this.var_com_intellij_ui_components_OnOffButton_a, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel8 = new JLabel();
|
||
this.a(jLabel8, this.a("i18n/i18n", "formatsql"));
|
||
jPanel18.add((Component)jLabel8, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_OnOffButton_b = new OnOffButton();
|
||
jPanel18.add((Component)this.var_com_intellij_ui_components_OnOffButton_b, new GridConstraints(2, 1, 1, 1, 8, 0, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel9 = new JLabel();
|
||
this.a(jLabel9, this.a("text/BatsLogBundle", "delete.log.suffix"));
|
||
jPanel18.add((Component)jLabel9, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
jPanel18.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(3, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
Spacer spacer13 = new Spacer();
|
||
jPanel18.add((Component)spacer13, new GridConstraints(3, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel21 = new JPanel();
|
||
jPanel21.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 5, 0), -1, -1));
|
||
jPanel17.add((Component)jPanel21, new GridConstraints(0, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel22 = new JPanel();
|
||
jPanel22.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel21.add((Component)jPanel22, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
|
||
JLabel jLabel10 = new JLabel();
|
||
this.a(jLabel10, this.a("text/BatsLogBundle", "config.form.console.encoding"));
|
||
jLabel10.setToolTipText(this.a("text/BatsLogBundle", "config.form.basic.label.databaseType"));
|
||
jPanel22.add((Component)jLabel10, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel23 = new JPanel();
|
||
jPanel23.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel21.add((Component)jPanel23, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
this.var_com_intellij_openapi_project_Project_a = new JComboBox();
|
||
jPanel23.add((Component)this.var_com_intellij_openapi_project_Project_a, new GridConstraints(0, 0, 1, 1, 8, 1, 2, 0, new Dimension(150, -1), new Dimension(150, -1), new Dimension(150, -1), 0, false));
|
||
JLabel jLabel11 = new JLabel();
|
||
jLabel11.setForeground(new Color(-4521984));
|
||
this.a(jLabel11, this.a("text/BatsLogBundle", "config.form.console.encoding.tips"));
|
||
jPanel21.add((Component)jLabel11, new GridConstraints(0, 2, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer14 = new Spacer();
|
||
jPanel21.add((Component)spacer14, new GridConstraints(0, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel24 = new JPanel();
|
||
jPanel24.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel17.add((Component)jPanel24, new GridConstraints(3, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel12 = new JLabel();
|
||
this.a(jLabel12, this.a("i18n/i18n", "remove.duplidate.sql.time.ms"));
|
||
jPanel24.add((Component)jLabel12, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel24.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 0, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = this.getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public JTextField javax_swing_JTextField_a() {
|
||
return this.var_javax_swing_JTextField_c;
|
||
}
|
||
|
||
public JTextField javax_swing_JTextField_b() {
|
||
return this.var_javax_swing_JTextField_d;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_b() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_c() {
|
||
return this.var_javax_swing_JPanel_c;
|
||
}
|
||
|
||
public OnOffButton com_intellij_ui_components_OnOffButton_a() {
|
||
return this.var_com_intellij_ui_components_OnOffButton_c;
|
||
}
|
||
|
||
public JTextField javax_swing_JTextField_c() {
|
||
return this.var_javax_swing_JTextField_e;
|
||
}
|
||
|
||
public OnOffButton com_intellij_ui_components_OnOffButton_b() {
|
||
return this.var_com_intellij_ui_components_OnOffButton_d;
|
||
}
|
||
|
||
public JComboBox<String> a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public OnOffButton com_intellij_ui_components_OnOffButton_c() {
|
||
return this.var_com_intellij_ui_components_OnOffButton_e;
|
||
}
|
||
|
||
public JLabel javax_swing_JLabel_a() {
|
||
return this.var_javax_swing_JLabel_a;
|
||
}
|
||
|
||
public OnOffButton com_intellij_ui_components_OnOffButton_d() {
|
||
return this.var_com_intellij_ui_components_OnOffButton_a;
|
||
}
|
||
|
||
public JTextField javax_swing_JTextField_d() {
|
||
return this.var_javax_swing_JTextField_a;
|
||
}
|
||
|
||
public OnOffButton e() {
|
||
return this.var_com_intellij_ui_components_OnOffButton_b;
|
||
}
|
||
|
||
public MybatisCodeHelperLogSettingState cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a() {
|
||
return this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void a(JTextField jTextField) {
|
||
this.var_javax_swing_JTextField_c = jTextField;
|
||
}
|
||
|
||
public void b(JTextField jTextField) {
|
||
this.var_javax_swing_JTextField_d = jTextField;
|
||
}
|
||
|
||
public void b(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_b = jPanel;
|
||
}
|
||
|
||
public void c(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_c = jPanel;
|
||
}
|
||
|
||
public void a(OnOffButton onOffButton) {
|
||
this.var_com_intellij_ui_components_OnOffButton_c = onOffButton;
|
||
}
|
||
|
||
public void c(JTextField jTextField) {
|
||
this.var_javax_swing_JTextField_e = jTextField;
|
||
}
|
||
|
||
public void b(OnOffButton onOffButton) {
|
||
this.var_com_intellij_ui_components_OnOffButton_d = onOffButton;
|
||
}
|
||
|
||
public void a(JComboBox<String> jComboBox) {
|
||
this.var_com_intellij_openapi_project_Project_a = jComboBox;
|
||
}
|
||
|
||
public void c(OnOffButton onOffButton) {
|
||
this.var_com_intellij_ui_components_OnOffButton_e = onOffButton;
|
||
}
|
||
|
||
public void a(JLabel jLabel) {
|
||
this.var_javax_swing_JLabel_a = jLabel;
|
||
}
|
||
|
||
public void d(OnOffButton onOffButton) {
|
||
this.var_com_intellij_ui_components_OnOffButton_a = onOffButton;
|
||
}
|
||
|
||
public void d(JTextField jTextField) {
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
}
|
||
|
||
public void e(OnOffButton onOffButton) {
|
||
this.var_com_intellij_ui_components_OnOffButton_b = onOffButton;
|
||
}
|
||
|
||
public void a(MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState) {
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a = mybatisCodeHelperLogSettingState;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (this == object) {
|
||
return true;
|
||
}
|
||
if (object == null || this.getClass() != object.getClass()) {
|
||
return false;
|
||
}
|
||
i i2 = (i)object;
|
||
if (!Objects.equals(this.var_com_intellij_openapi_project_Project_a, i2.var_com_intellij_openapi_project_Project_a)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JPanel_a, i2.var_javax_swing_JPanel_a)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JTextField_c, i2.var_javax_swing_JTextField_c)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JTextField_d, i2.var_javax_swing_JTextField_d)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JPanel_b, i2.var_javax_swing_JPanel_b)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JPanel_c, i2.var_javax_swing_JPanel_c)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_com_intellij_ui_components_OnOffButton_c, i2.var_com_intellij_ui_components_OnOffButton_c)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JTextField_e, i2.var_javax_swing_JTextField_e)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_com_intellij_ui_components_OnOffButton_d, i2.var_com_intellij_ui_components_OnOffButton_d)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_com_intellij_openapi_project_Project_a, i2.var_com_intellij_openapi_project_Project_a)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_com_intellij_ui_components_OnOffButton_e, i2.var_com_intellij_ui_components_OnOffButton_e)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JLabel_a, i2.var_javax_swing_JLabel_a)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_com_intellij_ui_components_OnOffButton_a, i2.var_com_intellij_ui_components_OnOffButton_a)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JTextField_a, i2.var_javax_swing_JTextField_a)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_com_intellij_ui_components_OnOffButton_b, i2.var_com_intellij_ui_components_OnOffButton_b)) {
|
||
return false;
|
||
}
|
||
if (!Objects.equals(this.var_javax_swing_JTextField_b, i2.var_javax_swing_JTextField_b)) {
|
||
return false;
|
||
}
|
||
return Objects.equals(this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a, i2.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a);
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = this.var_com_intellij_openapi_project_Project_a != null ? this.var_com_intellij_openapi_project_Project_a.hashCode() : 0;
|
||
n2 = 31 * n2 + (this.var_javax_swing_JPanel_a != null ? this.var_javax_swing_JPanel_a.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JTextField_c != null ? this.var_javax_swing_JTextField_c.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JTextField_d != null ? this.var_javax_swing_JTextField_d.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JPanel_b != null ? this.var_javax_swing_JPanel_b.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JPanel_c != null ? this.var_javax_swing_JPanel_c.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_com_intellij_ui_components_OnOffButton_c != null ? this.var_com_intellij_ui_components_OnOffButton_c.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JTextField_e != null ? this.var_javax_swing_JTextField_e.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_com_intellij_ui_components_OnOffButton_d != null ? this.var_com_intellij_ui_components_OnOffButton_d.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_com_intellij_openapi_project_Project_a != null ? this.var_com_intellij_openapi_project_Project_a.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_com_intellij_ui_components_OnOffButton_e != null ? this.var_com_intellij_ui_components_OnOffButton_e.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JLabel_a != null ? this.var_javax_swing_JLabel_a.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_com_intellij_ui_components_OnOffButton_a != null ? this.var_com_intellij_ui_components_OnOffButton_a.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JTextField_a != null ? this.var_javax_swing_JTextField_a.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_com_intellij_ui_components_OnOffButton_b != null ? this.var_com_intellij_ui_components_OnOffButton_b.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_javax_swing_JTextField_b != null ? this.var_javax_swing_JTextField_b.hashCode() : 0);
|
||
n2 = 31 * n2 + (this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a != null ? this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.hashCode() : 0);
|
||
return n2;
|
||
}
|
||
|
||
public String toString() {
|
||
return "SettingForm{project=" + this.var_com_intellij_openapi_project_Project_a + ", root=" + this.var_javax_swing_JPanel_a + ", sqlPrefix=" + this.var_javax_swing_JTextField_c + ", paramsPrefix=" + this.var_javax_swing_JTextField_d + ", revertSqlPanel=" + this.var_javax_swing_JPanel_b + ", revertParamsPanel=" + this.var_javax_swing_JPanel_c + ", addTimestamp=" + this.var_com_intellij_ui_components_OnOffButton_c + ", timestampFormat=" + this.var_javax_swing_JTextField_e + ", startWithProject=" + this.var_com_intellij_ui_components_OnOffButton_d + ", consoleEncoding=" + (JComboBox)this.var_com_intellij_openapi_project_Project_a + ", enableMixedPrefix=" + this.var_com_intellij_ui_components_OnOffButton_e + ", sqlPrefixTips=" + this.var_javax_swing_JLabel_a + ", autoOpenLogConsole=" + this.var_com_intellij_ui_components_OnOffButton_a + ", removeDuplicateTime=" + this.var_javax_swing_JTextField_a + ", formatSql=" + this.var_com_intellij_ui_components_OnOffButton_b + ", deleteLogSuffix=" + this.var_javax_swing_JTextField_b + ", service=" + this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a + "}";
|
||
}
|
||
|
||
static {
|
||
var_boolean_a = !i.class.desiredAssertionStatus();
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
|
||
protected static class a<T extends DbType>
|
||
extends JLabel
|
||
implements ListCellRenderer<T> {
|
||
protected a() {
|
||
}
|
||
|
||
public Component a(JList<? extends T> jList, T t2, int n2, boolean bl, boolean bl2) {
|
||
this.setIcon(((DbType)((Object)t2)).getIcon());
|
||
if (((DbType)((Object)t2)).getIcon() == null) {
|
||
this.setIcon(icons.a.a);
|
||
}
|
||
this.setText(((DbType)((Object)t2)).getName());
|
||
return this;
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ Component getListCellRendererComponent(JList jList, Object object, int n2, boolean bl, boolean bl2) {
|
||
return this.a(jList, (DbType)((Object)object), n2, bl, bl2);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.e;
|
||
|
||
public class j {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package cn.com.pism.batslog.e.b;
|
||
|
||
import cn.com.pism.batslog.e.b;
|
||
import cn.com.pism.batslog.model.EnabledRgbColor;
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Rectangle;
|
||
import java.util.function.Consumer;
|
||
import javax.swing.DefaultCellEditor;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
import javax.swing.table.TableModel;
|
||
|
||
public class a
|
||
extends DefaultCellEditor {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private cn.com.pism.batslog.e.a.a var_cn_com_pism_batslog_e_a_a_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Consumer<RgbColor> var_java_util_function_Consumer_cn_com_pism_batslog_model_RgbColor__a;
|
||
private cn.com.pism.batslog.e.a<a> var_cn_com_pism_batslog_e_a_cn_com_pism_batslog_e_b_a$a__a;
|
||
private boolean var_boolean_a;
|
||
|
||
public a(Project project, Consumer<RgbColor> consumer, cn.com.pism.batslog.e.a<a> a2) {
|
||
super(new JTextField());
|
||
this.setClickCountToStart(1);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_javax_swing_JPanel_a = consumer;
|
||
this.var_javax_swing_JPanel_a = a2;
|
||
this.fireEditingCanceled();
|
||
}
|
||
|
||
private void a() {
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout());
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellEditorComponent(JTable jTable, Object object, boolean bl2, int n2, int n3) {
|
||
EnabledRgbColor enabledRgbColor = (EnabledRgbColor)object;
|
||
this.var_boolean_a = enabledRgbColor.isEnabledColor();
|
||
this.var_cn_com_pism_batslog_e_a_a_a = new cn.com.pism.batslog.e.a.a(this.var_com_intellij_openapi_project_Project_a, cn.com.pism.batslog.f.a.a(enabledRgbColor.getRgbColor()), 18, 18, cn.com.pism.batslog.a.a("config.form.console.enabledKeyWordColor.tips", new Object[0]), color -> {
|
||
TableModel tableModel = jTable.getModel();
|
||
RgbColor rgbColor = new RgbColor(color.getRed(), color.getGreen(), color.getBlue());
|
||
tableModel.setValueAt(new EnabledRgbColor(this.var_boolean_a, rgbColor), n2, n3);
|
||
this.var_javax_swing_JPanel_a.accept(rgbColor);
|
||
}, bl -> {
|
||
this.var_boolean_a = bl;
|
||
this.var_javax_swing_JPanel_a.call(new a((String)jTable.getModel().getValueAt(n2, 0), (boolean)bl));
|
||
});
|
||
this.var_cn_com_pism_batslog_e_a_a_a.javax_swing_JComponent_a().setBounds(new Rectangle(18, 18));
|
||
this.var_cn_com_pism_batslog_e_a_a_a.a(enabledRgbColor.isEnabledColor());
|
||
this.b();
|
||
this.var_javax_swing_JPanel_a.add(this.var_cn_com_pism_batslog_e_a_a_a.javax_swing_JComponent_a());
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Override
|
||
public Object getCellEditorValue() {
|
||
Color color = ((b)this.var_cn_com_pism_batslog_e_a_a_a.javax_swing_JComponent_a()).a();
|
||
RgbColor rgbColor = new RgbColor(color.getRed(), color.getGreen(), color.getBlue());
|
||
return new EnabledRgbColor(this.var_boolean_a, rgbColor);
|
||
}
|
||
|
||
public static class a {
|
||
private String var_java_lang_String_a;
|
||
private boolean var_boolean_a;
|
||
|
||
public a(String string, boolean bl) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public a() {
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof a)) {
|
||
return false;
|
||
}
|
||
a a2 = (a)object;
|
||
if (!a2.a(this)) {
|
||
return false;
|
||
}
|
||
String string = this.java_lang_String_a();
|
||
String string2 = a2.java_lang_String_a();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
return this.boolean_a() == a2.boolean_a();
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof a;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.java_lang_String_a();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
n3 = n3 * 59 + (this.boolean_a() ? 79 : 97);
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "MyColorButtonEditor.Row(id=" + this.java_lang_String_a() + ", enabled=" + this.boolean_a() + ")";
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package cn.com.pism.batslog.e.b;
|
||
|
||
import cn.com.pism.batslog.a;
|
||
import cn.com.pism.batslog.model.EnabledRgbColor;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.awt.Component;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Rectangle;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellRenderer;
|
||
|
||
public class b
|
||
implements TableCellRenderer {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private cn.com.pism.batslog.e.a.a var_cn_com_pism_batslog_e_a_a_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
|
||
public b(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
private void a() {
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout());
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellRendererComponent(JTable jTable, Object object, boolean bl2, boolean bl3, int n2, int n3) {
|
||
EnabledRgbColor enabledRgbColor = (EnabledRgbColor)object;
|
||
this.var_cn_com_pism_batslog_e_a_a_a = new cn.com.pism.batslog.e.a.a(this.var_com_intellij_openapi_project_Project_a, cn.com.pism.batslog.f.a.a(enabledRgbColor.getRgbColor()), 18, 18, cn.com.pism.batslog.a.a("config.form.console.enabledKeyWordColor.tips", new Object[0]) + "render", color -> {}, bl -> {});
|
||
this.var_cn_com_pism_batslog_e_a_a_a.javax_swing_JComponent_a().setBounds(new Rectangle(18, 18));
|
||
this.var_cn_com_pism_batslog_e_a_a_a.a(enabledRgbColor.isEnabledColor());
|
||
this.b();
|
||
this.var_javax_swing_JPanel_a.add(this.var_cn_com_pism_batslog_e_a_a_a.javax_swing_JComponent_a());
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.ui.table.JBTable
|
||
*/
|
||
package cn.com.pism.batslog.e.b;
|
||
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.ui.table.JBTable;
|
||
import java.awt.Component;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Rectangle;
|
||
import java.util.function.Consumer;
|
||
import javax.swing.DefaultCellEditor;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
import javax.swing.table.DefaultTableModel;
|
||
import javax.swing.table.TableColumn;
|
||
import javax.swing.table.TableColumnModel;
|
||
|
||
public class c
|
||
extends DefaultCellEditor {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JBTable var_com_intellij_ui_table_JBTable_a;
|
||
|
||
public c() {
|
||
super(new JTextField());
|
||
}
|
||
|
||
public c(JBTable jBTable, Consumer<String> consumer) {
|
||
super(new JTextField());
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
this.setClickCountToStart(1);
|
||
this.a(consumer);
|
||
this.a();
|
||
this.var_javax_swing_JPanel_a.add(this.var_javax_swing_JButton_a);
|
||
}
|
||
|
||
private void a(Consumer<String> consumer) {
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.var_javax_swing_JButton_a.setIcon(AllIcons.Actions.GC);
|
||
TableColumnModel tableColumnModel = this.var_com_intellij_ui_table_JBTable_a.getColumnModel();
|
||
TableColumn tableColumn = tableColumnModel.getColumn(5);
|
||
this.var_javax_swing_JButton_a.setBounds(new Rectangle(tableColumn.getWidth(), this.var_com_intellij_ui_table_JBTable_a.getRowHeight()));
|
||
this.var_javax_swing_JButton_a.addActionListener(actionEvent -> {
|
||
this.fireEditingCanceled();
|
||
int n2 = this.var_com_intellij_ui_table_JBTable_a.getSelectedRow();
|
||
DefaultTableModel defaultTableModel = (DefaultTableModel)this.var_com_intellij_ui_table_JBTable_a.getModel();
|
||
defaultTableModel.removeRow(n2);
|
||
consumer.accept("");
|
||
});
|
||
}
|
||
|
||
private void a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout());
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellEditorComponent(JTable jTable, Object object, boolean bl, int n2, int n3) {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Override
|
||
public Object getCellEditorValue() {
|
||
return this.var_javax_swing_JButton_a.getText();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.ui.table.JBTable
|
||
*/
|
||
package cn.com.pism.batslog.e.b;
|
||
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.ui.table.JBTable;
|
||
import java.awt.Component;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Rectangle;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellRenderer;
|
||
import javax.swing.table.TableColumn;
|
||
import javax.swing.table.TableColumnModel;
|
||
|
||
public class d
|
||
implements TableCellRenderer {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JBTable var_com_intellij_ui_table_JBTable_a;
|
||
|
||
public d(JBTable jBTable) {
|
||
this.var_com_intellij_ui_table_JBTable_a = jBTable;
|
||
this.a();
|
||
this.b();
|
||
this.var_javax_swing_JPanel_a.add(this.var_javax_swing_JButton_a);
|
||
}
|
||
|
||
private void a() {
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.var_javax_swing_JButton_a.setIcon(AllIcons.Actions.GC);
|
||
this.var_javax_swing_JButton_a.setBackground(null);
|
||
this.var_javax_swing_JButton_a.setBorder(null);
|
||
TableColumnModel tableColumnModel = this.var_com_intellij_ui_table_JBTable_a.getColumnModel();
|
||
TableColumn tableColumn = tableColumnModel.getColumn(5);
|
||
this.var_javax_swing_JButton_a.setBounds(new Rectangle(tableColumn.getWidth(), this.var_com_intellij_ui_table_JBTable_a.getRowHeight()));
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout());
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellRendererComponent(JTable jTable, Object object, boolean bl, boolean bl2, int n2, int n3) {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ui.components.OnOffButton
|
||
*/
|
||
package cn.com.pism.batslog.e.b;
|
||
|
||
import com.intellij.ui.components.OnOffButton;
|
||
import java.awt.Component;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Rectangle;
|
||
import java.util.function.Consumer;
|
||
import javax.swing.DefaultCellEditor;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
|
||
public class e
|
||
extends DefaultCellEditor {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private OnOffButton var_com_intellij_ui_components_OnOffButton_a;
|
||
private Consumer<Boolean> var_java_util_function_Consumer_java_lang_Boolean__a;
|
||
|
||
public e(Consumer<Boolean> consumer) {
|
||
super(new JTextField());
|
||
this.setClickCountToStart(1);
|
||
this.var_javax_swing_JPanel_a = consumer;
|
||
}
|
||
|
||
private void a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout());
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellEditorComponent(JTable jTable, Object object, boolean bl, int n2, int n3) {
|
||
this.var_com_intellij_ui_components_OnOffButton_a = new OnOffButton();
|
||
this.var_com_intellij_ui_components_OnOffButton_a.setBounds(new Rectangle(50, 24));
|
||
this.fireEditingCanceled();
|
||
this.var_com_intellij_ui_components_OnOffButton_a.addChangeListener(changeEvent -> {
|
||
jTable.getModel().setValueAt(this.var_com_intellij_ui_components_OnOffButton_a.isSelected(), n2, n3);
|
||
this.var_javax_swing_JPanel_a.accept(this.var_com_intellij_ui_components_OnOffButton_a.isSelected());
|
||
});
|
||
this.a();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_ui_components_OnOffButton_a);
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Override
|
||
public Object getCellEditorValue() {
|
||
return this.var_com_intellij_ui_components_OnOffButton_a.isSelected();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ui.components.OnOffButton
|
||
*/
|
||
package cn.com.pism.batslog.e.b;
|
||
|
||
import com.intellij.ui.components.OnOffButton;
|
||
import java.awt.Component;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Rectangle;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellRenderer;
|
||
|
||
public class f
|
||
implements TableCellRenderer {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private OnOffButton var_com_intellij_ui_components_OnOffButton_a;
|
||
|
||
public f() {
|
||
this.a();
|
||
this.b();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_ui_components_OnOffButton_a);
|
||
}
|
||
|
||
private void a() {
|
||
this.var_com_intellij_ui_components_OnOffButton_a = new OnOffButton();
|
||
this.var_com_intellij_ui_components_OnOffButton_a.setBounds(new Rectangle(50, 24));
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout());
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellRendererComponent(JTable jTable, Object object, boolean bl, boolean bl2, int n2, int n3) {
|
||
this.var_com_intellij_ui_components_OnOffButton_a.setSelected(((Boolean)object).booleanValue());
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.impl.ConsoleViewImpl
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.CommonDataKeys
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.SelectionModel
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.wm.ex.ToolWindowEx
|
||
* com.intellij.ui.JBColor
|
||
* com.intellij.ui.LanguageTextField
|
||
* com.intellij.ui.components.OnOffButton
|
||
* org.apache.commons.collections.CollectionUtils
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import cn.com.pism.batslog.e.e;
|
||
import cn.com.pism.batslog.f.g;
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
import com.intellij.execution.impl.ConsoleViewImpl;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.SelectionModel;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.wm.ex.ToolWindowEx;
|
||
import com.intellij.ui.JBColor;
|
||
import com.intellij.ui.LanguageTextField;
|
||
import com.intellij.ui.components.OnOffButton;
|
||
import java.awt.Color;
|
||
import java.awt.Toolkit;
|
||
import java.awt.datatransfer.Clipboard;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.swing.table.DefaultTableModel;
|
||
import org.apache.commons.collections.CollectionUtils;
|
||
|
||
public class a {
|
||
public static Map<Project, AnAction[]> var_java_util_Map_com_intellij_openapi_project_Project,_com_intellij_openapi_actionSystem_AnAction_arr__a;
|
||
public static ToolWindowEx var_com_intellij_openapi_wm_ex_ToolWindowEx_a;
|
||
public static Map<Project, Boolean> var_java_util_Map_com_intellij_openapi_project_Project,_java_lang_Boolean__b;
|
||
public static Map<Project, ConsoleViewImpl> c;
|
||
public static OnOffButton var_com_intellij_ui_components_OnOffButton_a;
|
||
public static Map<Project, List<String>> d;
|
||
public static Map<Project, List<String>> e;
|
||
public static Map<String, ConsoleViewContentType> f;
|
||
public static int var_int_a;
|
||
public static int var_int_b;
|
||
public static Map<Project, e> g;
|
||
public static Map<Project, DefaultTableModel> h;
|
||
|
||
public static void a(AnActionEvent anActionEvent, String string) {
|
||
cn.com.pism.batslog.f.g.a(string, anActionEvent.getProject(), Boolean.FALSE);
|
||
List<String> list = e.get(anActionEvent.getProject());
|
||
if (CollectionUtils.isNotEmpty(list)) {
|
||
String string2 = String.join((CharSequence)"\n\n", list);
|
||
cn.com.pism.batslog.f.a.a(string2);
|
||
}
|
||
e.put(anActionEvent.getProject(), new ArrayList());
|
||
}
|
||
|
||
public static void a(String string) {
|
||
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||
clipboard.setContents(new StringSelection(string), null);
|
||
}
|
||
|
||
public static Boolean a(Project project) {
|
||
Boolean bl = var_java_util_Map_com_intellij_openapi_project_Project,_java_lang_Boolean__b.get(project);
|
||
bl = bl == null ? Boolean.FALSE : bl;
|
||
return bl;
|
||
}
|
||
|
||
public static Color a(RgbColor rgbColor) {
|
||
return new JBColor(new Color(rgbColor.getR(), rgbColor.getG(), rgbColor.getB()), new Color(rgbColor.getR(), rgbColor.getG(), rgbColor.getB()));
|
||
}
|
||
|
||
public static LanguageTextField a(Language language, Project project, String string) {
|
||
LanguageTextField languageTextField = new LanguageTextField(language, project, string, false);
|
||
languageTextField.ensureWillComputePreferredSize();
|
||
languageTextField.getPreferredSize();
|
||
languageTextField.addNotify();
|
||
languageTextField.setEnabled(true);
|
||
languageTextField.setText(string);
|
||
return languageTextField;
|
||
}
|
||
|
||
public static String a(AnActionEvent anActionEvent) {
|
||
Editor editor = (Editor)anActionEvent.getRequiredData(CommonDataKeys.EDITOR);
|
||
SelectionModel selectionModel = editor.getSelectionModel();
|
||
return selectionModel.getSelectedText();
|
||
}
|
||
|
||
static {
|
||
var_java_util_Map_com_intellij_openapi_project_Project,_com_intellij_openapi_actionSystem_AnAction_arr__a = new HashMap<Project, AnAction[]>();
|
||
var_java_util_Map_com_intellij_openapi_project_Project,_java_lang_Boolean__b = new HashMap<Project, Boolean>();
|
||
c = new HashMap<Project, ConsoleViewImpl>();
|
||
d = new HashMap<Project, List<String>>();
|
||
e = new HashMap<Project, List<String>>();
|
||
f = new HashMap<String, ConsoleViewContentType>();
|
||
var_int_a = 0;
|
||
var_int_b = 0;
|
||
g = new HashMap<Project, e>();
|
||
h = new HashMap<Project, DefaultTableModel>();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.ActionGroup
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
|
||
public class b {
|
||
public static ActionToolbar a(String string, boolean bl, DefaultActionGroup defaultActionGroup) {
|
||
ActionManager actionManager = ActionManager.getInstance();
|
||
return actionManager.createActionToolbar(string, (ActionGroup)defaultActionGroup, bl);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.openapi.editor.markup.EffectType
|
||
* com.intellij.openapi.editor.markup.TextAttributes
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.ColorUtil
|
||
* com.intellij.ui.Gray
|
||
* com.intellij.ui.JBColor
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import cn.com.pism.batslog.model.ConsoleColorConfig;
|
||
import cn.com.pism.batslog.model.RgbColor;
|
||
import cn.com.pism.batslog.model.ShowColorConfig;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.openapi.editor.markup.EffectType;
|
||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.ColorUtil;
|
||
import com.intellij.ui.Gray;
|
||
import com.intellij.ui.JBColor;
|
||
import java.awt.Color;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.UUID;
|
||
import java.util.concurrent.atomic.AtomicInteger;
|
||
|
||
public class c {
|
||
private c() {
|
||
}
|
||
|
||
public static ConsoleViewContentType a(Project project) {
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
Color color = a.a(mybatisCodeHelperLogSettingState.getKeyWordDefCol());
|
||
TextAttributes textAttributes = new TextAttributes(color, null, null, EffectType.BOXED, 0);
|
||
return new ConsoleViewContentType(project.getName() + "BatsLogKeywords", textAttributes);
|
||
}
|
||
|
||
public static ConsoleViewContentType b(Project project) {
|
||
JBColor jBColor = new JBColor((Color)Gray._140, (Color)Gray._128);
|
||
TextAttributes textAttributes = new TextAttributes((Color)jBColor, null, null, EffectType.BOXED, 0);
|
||
return new ConsoleViewContentType(project.getName() + "BatsLogNotes", textAttributes);
|
||
}
|
||
|
||
public static List<ShowColorConfig> a(List<ConsoleColorConfig> list) {
|
||
ArrayList<ShowColorConfig> arrayList = new ArrayList<ShowColorConfig>();
|
||
list.forEach(consoleColorConfig -> {
|
||
RgbColor rgbColor = consoleColorConfig.getBackgroundColor();
|
||
RgbColor rgbColor2 = consoleColorConfig.getForegroundColor();
|
||
JBColor jBColor = new JBColor(new Color(rgbColor.getR(), rgbColor.getG(), rgbColor.getB()), new Color(rgbColor.getR(), rgbColor.getG(), rgbColor.getB()));
|
||
JBColor jBColor2 = new JBColor(new Color(rgbColor2.getR(), rgbColor2.getG(), rgbColor2.getB()), new Color(rgbColor2.getR(), rgbColor2.getG(), rgbColor2.getB()));
|
||
ShowColorConfig showColorConfig = new ShowColorConfig(consoleColorConfig.getKeyWord(), consoleColorConfig.isEnabled(), ColorUtil.toHtmlColor((Color)jBColor), consoleColorConfig.isEnableBgColor(), ColorUtil.toHtmlColor((Color)jBColor2), consoleColorConfig.isEnabledFgColor());
|
||
arrayList.add(showColorConfig);
|
||
});
|
||
return arrayList;
|
||
}
|
||
|
||
public static List<ConsoleColorConfig> b(List<ShowColorConfig> list) {
|
||
ArrayList<ConsoleColorConfig> arrayList = new ArrayList<ConsoleColorConfig>();
|
||
AtomicInteger atomicInteger = new AtomicInteger(1);
|
||
list.forEach(showColorConfig -> {
|
||
Color color = ColorUtil.fromHex((String)showColorConfig.getBg());
|
||
Color color2 = ColorUtil.fromHex((String)showColorConfig.getFg());
|
||
ConsoleColorConfig consoleColorConfig = new ConsoleColorConfig(UUID.randomUUID().toString(), atomicInteger.get(), showColorConfig.getKeyword(), new RgbColor(color.getRed(), color.getGreen(), color.getBlue()), showColorConfig.isBgEnabled(), new RgbColor(color2.getRed(), color2.getGreen(), color2.getBlue()), showColorConfig.isFgEnabled(), showColorConfig.isEnabled());
|
||
arrayList.add(consoleColorConfig);
|
||
atomicInteger.getAndIncrement();
|
||
});
|
||
return arrayList;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.openapi.editor.markup.EffectType
|
||
* com.intellij.openapi.editor.markup.TextAttributes
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.lang3.StringUtils
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import cn.com.pism.batslog.model.ConsoleColorConfig;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.openapi.editor.markup.EffectType;
|
||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.stream.Collectors;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
|
||
public class d {
|
||
private d() {
|
||
}
|
||
|
||
public static Map<String, ConsoleColorConfig> a(List<ConsoleColorConfig> list) {
|
||
return list.stream().collect(Collectors.toMap(ConsoleColorConfig::getKeyWord, consoleColorConfig -> consoleColorConfig));
|
||
}
|
||
|
||
public static Map<String, ConsoleViewContentType> a(Project project, List<ConsoleColorConfig> list) {
|
||
HashMap<String, ConsoleViewContentType> hashMap = new HashMap<String, ConsoleViewContentType>(0);
|
||
ConsoleViewContentType consoleViewContentType = ConsoleViewContentType.NORMAL_OUTPUT;
|
||
for (ConsoleColorConfig consoleColorConfig : list) {
|
||
TextAttributes textAttributes = new TextAttributes(consoleColorConfig.isEnabledFgColor() ? a.a(consoleColorConfig.getForegroundColor()) : consoleViewContentType.getAttributes().getForegroundColor(), consoleColorConfig.isEnableBgColor() ? a.a(consoleColorConfig.getBackgroundColor()) : consoleViewContentType.getAttributes().getBackgroundColor(), null, EffectType.BOXED, 0);
|
||
if (!StringUtils.isNotBlank((CharSequence)consoleColorConfig.getKeyWord()) || !consoleColorConfig.isEnabled()) continue;
|
||
hashMap.put(consoleColorConfig.getKeyWord(), new ConsoleViewContentType(project.getName() + "ConsoleColor" + consoleColorConfig.getKeyWord(), textAttributes));
|
||
}
|
||
return hashMap;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.EditorFactory
|
||
* com.intellij.openapi.editor.EditorSettings
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.EditorFactory;
|
||
import com.intellij.openapi.editor.EditorSettings;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.Objects;
|
||
|
||
public class e {
|
||
public static Editor a(Project project, Language language, String string, boolean bl) {
|
||
EditorFactory editorFactory = EditorFactory.getInstance();
|
||
Editor editor = editorFactory.createEditor(editorFactory.createDocument((CharSequence)string), project, (FileType)Objects.requireNonNull(language.getAssociatedFileType()), bl);
|
||
EditorSettings editorSettings = editor.getSettings();
|
||
editorSettings.setLineNumbersShown(false);
|
||
editorSettings.setRefrainFromScrolling(false);
|
||
editorSettings.setLineMarkerAreaShown(false);
|
||
return editor;
|
||
}
|
||
|
||
public static void a(Editor editor) {
|
||
EditorFactory.getInstance().releaseEditor(editor);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
public class f {
|
||
private String a;
|
||
private String b;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public f(String string, String string2) {
|
||
this.a = string;
|
||
this.b = string2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.alibaba.druid.DbType
|
||
* com.alibaba.druid.sql.SQLUtils
|
||
* com.alibaba.druid.sql.SQLUtils$FormatOption
|
||
* com.alibaba.druid.util.JdbcConstants
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.execution.impl.ConsoleViewImpl
|
||
* com.intellij.execution.ui.ConsoleViewContentType
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.collections.CollectionUtils
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.apache.commons.lang3.math.NumberUtils
|
||
* org.apache.commons.lang3.time.DateFormatUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.slf4j.Logger
|
||
* org.slf4j.LoggerFactory
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import cn.com.pism.batslog.f.c;
|
||
import cn.com.pism.batslog.f.f;
|
||
import cn.com.pism.batslog.f.h;
|
||
import cn.com.pism.batslog.model.BslErrorMod;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.alibaba.druid.DbType;
|
||
import com.alibaba.druid.sql.SQLUtils;
|
||
import com.alibaba.druid.util.JdbcConstants;
|
||
import com.ccnode.codegenerator.g.b;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.execution.impl.ConsoleViewImpl;
|
||
import com.intellij.execution.ui.ConsoleViewContentType;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.io.Serializable;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.Collection;
|
||
import java.util.List;
|
||
import java.util.Locale;
|
||
import java.util.Map;
|
||
import java.util.Set;
|
||
import javax.swing.table.DefaultTableModel;
|
||
import org.apache.commons.collections.CollectionUtils;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.apache.commons.lang3.math.NumberUtils;
|
||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.slf4j.Logger;
|
||
import org.slf4j.LoggerFactory;
|
||
|
||
public class g {
|
||
private static final Logger var_org_slf4j_Logger_a;
|
||
public static final String[] var_java_lang_String_arr_a;
|
||
public static final String[] b;
|
||
private static final int var_int_a = 100;
|
||
private static Set<String> var_java_util_Set_java_lang_String__a;
|
||
|
||
public static void a(String string, Project project) {
|
||
g.a(string, project, Boolean.TRUE);
|
||
}
|
||
|
||
public static void a(String string, Project project, a a2) {
|
||
g.a(string, project, Boolean.FALSE, null, a2);
|
||
}
|
||
|
||
public static void a(String string, Project project, Boolean bl) {
|
||
g.a(string, project, bl, null, null);
|
||
}
|
||
|
||
public static String java_lang_String_a(String string, String string2) {
|
||
String string3;
|
||
String string4 = JdbcConstants.MYSQL.name();
|
||
String string5 = "Preparing:";
|
||
String string6 = "Parameters:";
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
ArrayList<String> arrayList2 = new ArrayList<String>();
|
||
ArrayList<String> arrayList3 = new ArrayList<String>();
|
||
String string7 = string.trim();
|
||
String string8 = g.b(string7, string3 = string2.trim());
|
||
if (string8.length() > 0 && !string8.toLowerCase().equals("null") && !string8.endsWith(")")) {
|
||
string = string7.substring(0, string7.length() - string8.length());
|
||
string2 = string3.substring(0, string3.length() - string8.length());
|
||
}
|
||
String string9 = string + "\n" + string2;
|
||
g.b(string9, arrayList, arrayList2, arrayList3, string5, string6);
|
||
String string10 = (String)arrayList.get(0);
|
||
String string11 = (String)arrayList3.get(0);
|
||
String string12 = (String)arrayList2.get(0);
|
||
SQLUtils.FormatOption formatOption = new SQLUtils.FormatOption();
|
||
List<Object> list = g.b(string12);
|
||
Object object = string10;
|
||
boolean bl = false;
|
||
object = bl ? SQLUtils.format((String)string10, (DbType)DbType.of((String)string4.toLowerCase(Locale.ROOT)), list, (SQLUtils.FormatOption)formatOption) : g.a(string10, list);
|
||
if (!((String)object).endsWith(";")) {
|
||
object = (String)object + ";";
|
||
}
|
||
return object;
|
||
}
|
||
|
||
private static String b(String string, String string2) {
|
||
int n2 = string.length();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (int i2 = string2.length(); n2 > 0 && i2 > 0 && string.charAt(n2 - 1) == string2.charAt(i2 - 1); --n2, --i2) {
|
||
stringBuilder.insert(0, string.charAt(n2 - 1));
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
@NotNull
|
||
private static String a(String string, List<Object> list) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (Object stringArray2 : list) {
|
||
if (stringArray2 == null) {
|
||
arrayList.add("null");
|
||
continue;
|
||
}
|
||
if (stringArray2 instanceof Integer || stringArray2 instanceof Long || stringArray2 instanceof Double || stringArray2 instanceof Float || stringArray2 instanceof Boolean || stringArray2 instanceof Byte || stringArray2 instanceof Short) {
|
||
arrayList.add(stringArray2.toString());
|
||
continue;
|
||
}
|
||
arrayList.add("'" + stringArray2.toString() + "'");
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
String[] stringArray = string.split("\\?");
|
||
for (int i2 = 0; i2 < stringArray.length; ++i2) {
|
||
stringBuilder.append(stringArray[i2]);
|
||
if (i2 >= arrayList.size()) continue;
|
||
stringBuilder.append((String)arrayList.get(i2));
|
||
}
|
||
String string2 = stringBuilder.toString();
|
||
return string2;
|
||
}
|
||
|
||
public static String a(String string, String string2, Project project) {
|
||
try {
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
String string3 = JdbcConstants.MYSQL.name();
|
||
cn.com.pism.batslog.enums.DbType dbType = mybatisCodeHelperLogSettingState.getDbType();
|
||
string3 = !cn.com.pism.batslog.enums.DbType.OTHER.equals((Object)dbType) ? dbType.getType() : cn.com.pism.batslog.enums.DbType.OTHER.getType();
|
||
String string4 = StringUtils.isBlank((CharSequence)mybatisCodeHelperLogSettingState.getSqlPrefix()) ? "Preparing:" : mybatisCodeHelperLogSettingState.getSqlPrefix();
|
||
String string5 = StringUtils.isBlank((CharSequence)mybatisCodeHelperLogSettingState.getParamsPrefix()) ? "Parameters:" : mybatisCodeHelperLogSettingState.getParamsPrefix();
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
ArrayList<String> arrayList2 = new ArrayList<String>();
|
||
ArrayList<String> arrayList3 = new ArrayList<String>();
|
||
String string6 = string.trim();
|
||
String string7 = string2.trim();
|
||
String string8 = mybatisCodeHelperLogSettingState.getDeleteLogSuffix();
|
||
if (StringUtils.isNotBlank((CharSequence)string8)) {
|
||
if (string6.endsWith(string8)) {
|
||
string = string6.substring(0, string6.length() - string8.length());
|
||
}
|
||
if (string7.endsWith(string8)) {
|
||
string2 = string7.substring(0, string7.length() - string8.length());
|
||
}
|
||
}
|
||
String string9 = string + "\n" + string2;
|
||
if (Boolean.TRUE.equals(mybatisCodeHelperLogSettingState.getEnableMixedPrefix()) && string4.split(",").length > 1) {
|
||
g.a(string9, arrayList, arrayList2, arrayList3, string4, string5);
|
||
} else {
|
||
g.b(string9, arrayList, arrayList2, arrayList3, string4, string5);
|
||
}
|
||
String string10 = (String)arrayList.get(0);
|
||
String string11 = (String)arrayList3.get(0);
|
||
String string12 = (String)arrayList2.get(0);
|
||
SQLUtils.FormatOption formatOption = g.a(mybatisCodeHelperLogSettingState);
|
||
try {
|
||
List<Object> list = g.b(string12);
|
||
boolean bl = false;
|
||
Object object = "";
|
||
if (bl) {
|
||
object = SQLUtils.format((String)string10, (DbType)DbType.of((String)string3.toLowerCase(Locale.ROOT)), list, (SQLUtils.FormatOption)formatOption);
|
||
} else {
|
||
object = g.a(string10, list);
|
||
if (mybatisCodeHelperLogSettingState.getFormatSql().booleanValue()) {
|
||
object = com.ccnode.codegenerator.g.b.a((String)object, project);
|
||
}
|
||
}
|
||
if (!((String)object).endsWith(";")) {
|
||
object = (String)object + ";";
|
||
}
|
||
return object;
|
||
}
|
||
catch (Exception exception) {
|
||
return exception.getMessage();
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
return "preparing is:" + string + "\n parameter is:" + string2 + " \ncatch exception";
|
||
}
|
||
}
|
||
|
||
public static void a(String string, Project project, Boolean bl, ConsoleViewImpl consoleViewImpl, a a2) {
|
||
String string2;
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
ArrayList<String> arrayList2 = new ArrayList<String>();
|
||
ArrayList<String> arrayList3 = new ArrayList<String>();
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
String string3 = StringUtils.isBlank((CharSequence)mybatisCodeHelperLogSettingState.getSqlPrefix()) ? "Preparing:" : mybatisCodeHelperLogSettingState.getSqlPrefix();
|
||
String string4 = string2 = StringUtils.isBlank((CharSequence)mybatisCodeHelperLogSettingState.getParamsPrefix()) ? "Parameters:" : mybatisCodeHelperLogSettingState.getParamsPrefix();
|
||
if (Boolean.TRUE.equals(mybatisCodeHelperLogSettingState.getEnableMixedPrefix()) && string3.split(",").length > 1) {
|
||
g.a(string, arrayList, arrayList2, arrayList3, string3, string2);
|
||
} else {
|
||
g.b(string, arrayList, arrayList2, arrayList3, string3, string2);
|
||
}
|
||
if (a2 != null) {
|
||
a2.callback(!arrayList.isEmpty() ? (String)arrayList.get(0) : "", !arrayList2.isEmpty() ? (String)arrayList2.get(0) : "");
|
||
} else {
|
||
g.a(project, bl, consoleViewImpl, arrayList, arrayList2, arrayList3, mybatisCodeHelperLogSettingState);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* WARNING - void declaration
|
||
*/
|
||
private static void a(String object, List<String> list, List<String> list2, List<String> list3, String string, String string2) {
|
||
void var12_20;
|
||
Object object2;
|
||
String[] stringArray = string.split(",");
|
||
String[] stringArray2 = new String[]{};
|
||
if (StringUtils.isNotBlank((CharSequence)object)) {
|
||
Integer n2 = null;
|
||
if (stringArray.length > 0) {
|
||
for (String stringArray3 : stringArray) {
|
||
int n3 = ((String)object).indexOf(stringArray3);
|
||
if (n2 == null && n3 >= 0) {
|
||
n2 = n3;
|
||
continue;
|
||
}
|
||
if (n3 < 0) continue;
|
||
n2 = NumberUtils.min((int[])new int[]{n2, n3});
|
||
}
|
||
}
|
||
object2 = ((String)object).substring(0, n2);
|
||
int n4 = ((String)object2).contains("\n") ? 1 : 0;
|
||
Object object3 = " ";
|
||
if (n4 != 0) {
|
||
String[] stringArray3 = ((String)object2).split("\n");
|
||
object3 = stringArray3[stringArray3.length - 1];
|
||
} else {
|
||
object3 = object2;
|
||
}
|
||
object = ((String)object).substring(n2);
|
||
object = (String)object3 + (String)object;
|
||
stringArray2 = ((String)object).split("\n");
|
||
}
|
||
boolean bl = false;
|
||
object2 = "";
|
||
String[] stringArray4 = stringArray2;
|
||
int n4 = stringArray4.length;
|
||
boolean bl2 = false;
|
||
while (var12_20 < n4) {
|
||
String string3 = stringArray4[var12_20];
|
||
String[] stringArray5 = string.split(",");
|
||
if (stringArray5.length > 1) {
|
||
for (String string4 : stringArray5) {
|
||
int n5 = StringUtils.indexOf((CharSequence)string3, (CharSequence)string4);
|
||
if (n5 < 0) continue;
|
||
object2 = string4;
|
||
}
|
||
}
|
||
bl = g.a(list, list2, list3, string2, bl, (String)object2, string3);
|
||
++var12_20;
|
||
}
|
||
}
|
||
|
||
private static boolean a(List<String> list, List<String> list2, List<String> list3, String string, boolean bl, String string2, String string3) {
|
||
int n2 = StringUtils.indexOf((CharSequence)string3, (CharSequence)string2);
|
||
int n3 = StringUtils.indexOf((CharSequence)string3, (CharSequence)string);
|
||
if (n2 >= 0) {
|
||
list.add(string3.substring(n2 + string2.getBytes().length));
|
||
list3.add(g.a(string3, string2, n2));
|
||
} else if (n3 > 0) {
|
||
list2.add(string3.substring(n3 + string.getBytes().length));
|
||
bl = g.boolean_a(string3, string);
|
||
} else if (bl) {
|
||
int n4 = list2.size() - 1;
|
||
list2.set(n4, list2.get(n4) + "\r\n" + string3);
|
||
if (string3.endsWith(")")) {
|
||
bl = g.boolean_a(string3, string);
|
||
}
|
||
}
|
||
return bl;
|
||
}
|
||
|
||
private static void b(String object, List<String> list, List<String> list2, List<String> list3, String string, String string2) {
|
||
String[] stringArray = new String[]{};
|
||
if (StringUtils.isNotBlank((CharSequence)object)) {
|
||
String string3 = ((String)object).substring(0, ((String)object).indexOf(string));
|
||
boolean bl = string3.contains("\n");
|
||
String string4 = " ";
|
||
if (bl) {
|
||
String[] stringArray2 = string3.split("\n");
|
||
string4 = stringArray2[stringArray2.length - 1];
|
||
} else {
|
||
string4 = string3;
|
||
}
|
||
object = ((String)object).substring(((String)object).indexOf(string));
|
||
object = string4 + (String)object;
|
||
stringArray = ((String)object).split("\n");
|
||
}
|
||
boolean bl = false;
|
||
for (String string5 : stringArray) {
|
||
bl = g.a(list, list2, list3, string2, bl, string, string5);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static boolean boolean_a(String string, String string2) {
|
||
if (string.contains(string2) && StringUtils.isBlank((CharSequence)string.substring(string.indexOf(string2) + string2.length()))) {
|
||
return false;
|
||
}
|
||
int n2 = StringUtils.lastIndexOf((CharSequence)string, (CharSequence)"(");
|
||
if (n2 < 0) return true;
|
||
if (!string.endsWith(")")) return true;
|
||
String string3 = StringUtils.substring((String)string, (int)n2);
|
||
string3 = string3.substring(string3.indexOf("(") + 1, string3.lastIndexOf(")"));
|
||
if (Arrays.stream(var_java_lang_String_arr_a).anyMatch(string3::equalsIgnoreCase)) return false;
|
||
if (Arrays.stream(b).anyMatch(string3::equalsIgnoreCase)) return false;
|
||
return true;
|
||
}
|
||
|
||
private static void a(Project project, Boolean bl, ConsoleViewImpl consoleViewImpl, List<String> list, List<String> list2, List<String> list3, MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState) {
|
||
String string = JdbcConstants.MYSQL.name();
|
||
cn.com.pism.batslog.enums.DbType dbType = mybatisCodeHelperLogSettingState.getDbType();
|
||
string = !cn.com.pism.batslog.enums.DbType.OTHER.equals((Object)dbType) ? dbType.getType() : cn.com.pism.batslog.enums.DbType.OTHER.getType();
|
||
SQLUtils.FormatOption formatOption = g.a(mybatisCodeHelperLogSettingState);
|
||
for (int i2 = 0; i2 < list2.size(); ++i2) {
|
||
Object object;
|
||
Object object2;
|
||
String string2 = list.get(i2);
|
||
String string3 = list3.get(i2);
|
||
String string4 = list2.get(i2);
|
||
try {
|
||
List<Object> list4 = g.b(string4);
|
||
object2 = SQLUtils.format((String)string2, (DbType)DbType.of((String)string.toLowerCase(Locale.ROOT)), list4, (SQLUtils.FormatOption)formatOption);
|
||
if (!((String)object2).endsWith(";")) {
|
||
object2 = (String)object2 + ";";
|
||
}
|
||
if (bl.booleanValue()) {
|
||
if (consoleViewImpl == null) {
|
||
consoleViewImpl = cn.com.pism.batslog.f.a.c.get(project);
|
||
}
|
||
g.a(project, consoleViewImpl, string3, mybatisCodeHelperLogSettingState);
|
||
g.a((String)object2, project, consoleViewImpl);
|
||
continue;
|
||
}
|
||
object = cn.com.pism.batslog.f.a.e.get(project);
|
||
if (!CollectionUtils.isNotEmpty((Collection)object)) {
|
||
object = new ArrayList();
|
||
}
|
||
object.add(object2);
|
||
cn.com.pism.batslog.f.a.e.put(project, (List<String>)object);
|
||
continue;
|
||
}
|
||
catch (Exception exception) {
|
||
var_org_slf4j_Logger_a.error(exception.getMessage());
|
||
object2 = cn.com.pism.batslog.f.a.h.get(project);
|
||
object = exception.getStackTrace();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (StackTraceElement stackTraceElement : object) {
|
||
stringBuilder.append(stackTraceElement.toString()).append("\n");
|
||
}
|
||
((DefaultTableModel)object2).addRow(new BslErrorMod(string2, string4, DateFormatUtils.format((long)System.currentTimeMillis(), (String)"yy/MM/dd HH:mm:ss"), stringBuilder.toString()).toArray());
|
||
exception.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
|
||
public static void a(String string, Project project, ConsoleViewImpl consoleViewImpl) {
|
||
Map<String, ConsoleViewContentType> map = cn.com.pism.batslog.f.a.f;
|
||
String[] stringArray2 = ConsoleViewContentType.NORMAL_OUTPUT;
|
||
for (Map.Entry<String, ConsoleViewContentType> stringArray3 : map.entrySet()) {
|
||
String n2 = stringArray3.getKey();
|
||
String[] stringArray = stringArray3.getValue();
|
||
if (!string.trim().toUpperCase(Locale.ROOT).startsWith(n2)) continue;
|
||
stringArray2 = stringArray;
|
||
}
|
||
String[] stringArray5 = string.split("");
|
||
String[] stringArray = string.split(" |\t\n|\n|\t");
|
||
int n2 = 0;
|
||
for (String string2 : stringArray) {
|
||
boolean bl = g.a(string2);
|
||
n2 += string2.length();
|
||
String string3 = "";
|
||
if (bl) {
|
||
g.a(consoleViewImpl, project, string2, (ConsoleViewContentType)stringArray2);
|
||
} else {
|
||
consoleViewImpl.print(h.a(string2, project), (ConsoleViewContentType)stringArray2);
|
||
}
|
||
if (n2 >= stringArray5.length) continue;
|
||
string3 = stringArray5[n2];
|
||
n2 += string3.length();
|
||
consoleViewImpl.print(string3, (ConsoleViewContentType)stringArray2);
|
||
}
|
||
consoleViewImpl.print("\n", (ConsoleViewContentType)stringArray2);
|
||
}
|
||
|
||
public static void a(ConsoleViewImpl consoleViewImpl, Project project, String string, ConsoleViewContentType consoleViewContentType) {
|
||
ConsoleViewContentType consoleViewContentType2 = c.a(project);
|
||
consoleViewContentType2.getAttributes().setBackgroundColor(consoleViewContentType.getAttributes().getBackgroundColor());
|
||
if (MybatisCodeHelperLogSettingState.getInstance(project).isEnabledKeyWordDefCol()) {
|
||
consoleViewImpl.print(h.a(string, project), consoleViewContentType2);
|
||
} else {
|
||
consoleViewImpl.print(h.a(string, project), consoleViewContentType);
|
||
}
|
||
}
|
||
|
||
public static boolean a(String string) {
|
||
if (string == null) {
|
||
return false;
|
||
}
|
||
String string2 = string.toLowerCase();
|
||
Object object = var_org_slf4j_Logger_a;
|
||
if (object == null || object.size() == 0) {
|
||
object = cn.com.pism.batslog.b.b.a;
|
||
var_org_slf4j_Logger_a = object;
|
||
}
|
||
return object.contains(string2);
|
||
}
|
||
|
||
private static void a(Project project, ConsoleViewImpl consoleViewImpl, String string, MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState) {
|
||
consoleViewImpl.print(h.a("-- --------------------------------------\n", project), ConsoleViewContentType.ERROR_OUTPUT);
|
||
int n2 = cn.com.pism.batslog.f.a.var_int_a;
|
||
cn.com.pism.batslog.f.a.var_int_a = ++n2;
|
||
Object object = " ";
|
||
long l2 = System.currentTimeMillis();
|
||
if (Boolean.TRUE.equals(mybatisCodeHelperLogSettingState.getAddTimestamp())) {
|
||
String string2 = mybatisCodeHelperLogSettingState.getTimeFormat();
|
||
object = " " + (Serializable)(StringUtils.isBlank((CharSequence)string2) ? Long.valueOf(l2) : DateFormatUtils.format((long)l2, (String)string2)) + " ";
|
||
}
|
||
consoleViewImpl.print(h.a("# " + String.format("%04d", n2), project), c.b(project));
|
||
consoleViewImpl.print((String)object, ConsoleViewContentType.ERROR_OUTPUT);
|
||
consoleViewImpl.print(string + "\n", c.b(project));
|
||
}
|
||
|
||
@NotNull
|
||
private static SQLUtils.FormatOption a(MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState) {
|
||
SQLUtils.FormatOption formatOption = new SQLUtils.FormatOption();
|
||
formatOption.setDesensitize(mybatisCodeHelperLogSettingState.getDesensitize().booleanValue());
|
||
formatOption.setPrettyFormat(mybatisCodeHelperLogSettingState.getPrettyFormat().booleanValue());
|
||
formatOption.setParameterized(mybatisCodeHelperLogSettingState.getParameterized().booleanValue());
|
||
formatOption.setUppCase(mybatisCodeHelperLogSettingState.getToUpperCase().booleanValue());
|
||
return formatOption;
|
||
}
|
||
|
||
@NotNull
|
||
public static List<Object> a(String string) {
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
return new ArrayList<Object>();
|
||
}
|
||
String string2 = string.replace(", null,", ", null(Null),");
|
||
String[] stringArray = string2.split("\\),");
|
||
ArrayList<Object> arrayList = new ArrayList<Object>();
|
||
for (String string3 : stringArray) {
|
||
if (StringUtils.isNotBlank((CharSequence)string3)) {
|
||
String string4;
|
||
String string5 = null;
|
||
String string6 = string3.substring(1) + ")";
|
||
if (string6.contains("(")) {
|
||
int n2 = string6.lastIndexOf("(") + 1;
|
||
string4 = string6.substring(0, n2 - 1);
|
||
int n3 = string6.lastIndexOf(")");
|
||
if (n3 < n2) {
|
||
throw new RuntimeException("Exception, current string is:" + string6 + " \n param are:" + string);
|
||
}
|
||
string5 = string6.substring(n2, n3);
|
||
} else {
|
||
string4 = string3;
|
||
}
|
||
try {
|
||
arrayList.add(g.java_lang_Object_a(string4.trim(), string5));
|
||
}
|
||
catch (ClassNotFoundException classNotFoundException) {
|
||
classNotFoundException.printStackTrace();
|
||
}
|
||
continue;
|
||
}
|
||
arrayList.add("");
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@NotNull
|
||
public static List<Object> b(String string) {
|
||
if (string == null || string.length() == 0) {
|
||
return null;
|
||
}
|
||
string = string.replaceFirst("\\s++$", "");
|
||
ArrayList<f> arrayList = new ArrayList<f>();
|
||
ArrayList<Object> arrayList2 = new ArrayList<Object>();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
return arrayList2;
|
||
}
|
||
int n2 = string.length();
|
||
while (n2 > -1) {
|
||
if (string.lastIndexOf("null", n2) == n2 - 4) {
|
||
arrayList.add(0, new f("null", "Null"));
|
||
n2 = string.lastIndexOf("null", n2) - 2;
|
||
continue;
|
||
}
|
||
if (string.charAt(n2 - 1) == ')') {
|
||
int n3 = string.lastIndexOf(40, n2);
|
||
String object = string.substring(n3 + 1, n2 - 1);
|
||
n2 = n3;
|
||
int classNotFoundException = string.lastIndexOf(", ", n2);
|
||
while (classNotFoundException > -1 && string.lastIndexOf("null", classNotFoundException) != classNotFoundException - 4 && string.charAt(classNotFoundException - 1) != ')') {
|
||
classNotFoundException = string.lastIndexOf(", ", classNotFoundException - 1);
|
||
}
|
||
String string2 = string.substring(classNotFoundException == -1 ? 0 : classNotFoundException + 2, n2);
|
||
n2 = classNotFoundException;
|
||
arrayList.add(0, new f(string2, object));
|
||
continue;
|
||
}
|
||
n2 = -1;
|
||
}
|
||
if (arrayList.size() > 0) {
|
||
((f)arrayList.get(0)).a(((f)arrayList.get(0)).a().substring(1));
|
||
}
|
||
for (f f2 : arrayList) {
|
||
try {
|
||
arrayList2.add(g.java_lang_Object_a(f2.a(), f2.b()));
|
||
}
|
||
catch (ClassNotFoundException classNotFoundException) {
|
||
classNotFoundException.printStackTrace();
|
||
}
|
||
}
|
||
return arrayList2;
|
||
}
|
||
|
||
public static Object java_lang_Object_a(String string, String string2) throws ClassNotFoundException {
|
||
Class<?> clazz;
|
||
Object object = null;
|
||
if (string2.equals("Null")) {
|
||
return null;
|
||
}
|
||
object = Arrays.stream(var_java_lang_String_arr_a).anyMatch(string2::equalsIgnoreCase) ? ((clazz = Class.forName("java.lang." + string2)) == Integer.class ? Integer.valueOf(string) : (clazz == Long.class ? Long.valueOf(string) : (clazz == Double.class ? Double.valueOf(string) : (clazz == Boolean.class ? Boolean.valueOf(string) : (clazz == Byte.class ? Byte.valueOf(string) : (clazz == Short.class ? Short.valueOf(string) : (clazz == Float.class ? Float.valueOf(string) : String.valueOf(string)))))))) : string;
|
||
return object;
|
||
}
|
||
|
||
private static String a(String string, String string2, int n2) {
|
||
String string3 = "";
|
||
try {
|
||
String[] stringArray = StringUtils.split((String)string.substring(0, n2 + string2.getBytes().length), (String)"\n");
|
||
String string4 = stringArray[stringArray.length - 1];
|
||
if (StringUtils.isNotBlank((CharSequence)string4)) {
|
||
string3 = StringUtils.substring((String)string4, (int)0, (int)StringUtils.indexOf((CharSequence)string4, (CharSequence)string2));
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
var_org_slf4j_Logger_a.error(exception.getMessage());
|
||
}
|
||
return string3;
|
||
}
|
||
|
||
static {
|
||
var_org_slf4j_Logger_a = LoggerFactory.getLogger(g.class);
|
||
var_java_lang_String_arr_a = new String[]{"Integer", "Long", "Double", "String", "Boolean", "Byte", "Short", "Float"};
|
||
b = new String[]{"boolean", "byte", "short", "int", "long", "float", "double", "BigDecimal", "String", "Date", "Time", "Timestamp", "InputStream", "Object", "Reader", "Ref", "Blob", "Clob", "Array", "URL", "RowId", "NClob", "SQLXML"};
|
||
}
|
||
|
||
public static interface a {
|
||
public void callback(String var1, String var2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.lang3.StringUtils
|
||
*/
|
||
package cn.com.pism.batslog.f;
|
||
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.nio.charset.Charset;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
|
||
public class h {
|
||
public static final String a = "GBK";
|
||
|
||
private h() {
|
||
}
|
||
|
||
public static String a(String string, Project project) {
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
String string2 = mybatisCodeHelperLogSettingState.getEncoding();
|
||
if (StringUtils.isNotBlank((CharSequence)string2) && !"AUTO".equals(string2) && Charset.isSupported(string2)) {
|
||
return new String(string.getBytes(), Charset.forName(string2));
|
||
}
|
||
return string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.ActionUpdateThread
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.a;
|
||
|
||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public abstract class a
|
||
extends AnAction {
|
||
public a() {
|
||
}
|
||
|
||
public a(String string) {
|
||
super(string);
|
||
}
|
||
|
||
public a(Icon icon) {
|
||
super(icon);
|
||
}
|
||
|
||
public a(String string, String string2, Icon icon) {
|
||
super(string, string2, icon);
|
||
}
|
||
|
||
@NotNull
|
||
public ActionUpdateThread getActionUpdateThread() {
|
||
return ActionUpdateThread.BGT;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.ActionUpdateThread
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.a;
|
||
|
||
import com.intellij.openapi.actionSystem.ActionUpdateThread;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public abstract class b
|
||
extends AnAction {
|
||
public b() {
|
||
}
|
||
|
||
public b(String string) {
|
||
super(string);
|
||
}
|
||
|
||
public b(Icon icon) {
|
||
super(icon);
|
||
}
|
||
|
||
public b(String string, String string2, Icon icon) {
|
||
super(string, string2, icon);
|
||
}
|
||
|
||
@NotNull
|
||
public ActionUpdateThread getActionUpdateThread() {
|
||
return ActionUpdateThread.EDT;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.ccnode.codegenerator.ag.N
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.openapi.application.ApplicationInfo
|
||
* com.intellij.openapi.ide.CopyPasteManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.apache.commons.lang.exception.ExceptionUtils
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.b;
|
||
|
||
import com.ccnode.codegenerator.H.e;
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.ad.i;
|
||
import com.ccnode.codegenerator.ad.k;
|
||
import com.ccnode.codegenerator.ad.q_0;
|
||
import com.ccnode.codegenerator.ad.s;
|
||
import com.ccnode.codegenerator.af.b.b;
|
||
import com.ccnode.codegenerator.af.c.c;
|
||
import com.ccnode.codegenerator.af.c.d;
|
||
import com.ccnode.codegenerator.ag.N;
|
||
import com.ccnode.codegenerator.q.f;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.openapi.application.ApplicationInfo;
|
||
import com.intellij.openapi.ide.CopyPasteManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.awt.datatransfer.Transferable;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ResourceBundle;
|
||
import java.util.Set;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTabbedPane;
|
||
import javax.swing.JTextArea;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JTextField var_javax_swing_JTextField_c;
|
||
private JTextArea var_javax_swing_JTextArea_a;
|
||
private JButton var_javax_swing_JButton_b;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JTabbedPane var_javax_swing_JTabbedPane_a;
|
||
private JTextArea var_javax_swing_JTextArea_b;
|
||
private LinkLabel var_com_intellij_ui_components_labels_LinkLabel_c;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private JPanel var_javax_swing_JPanel_d;
|
||
private JButton var_javax_swing_JButton_c;
|
||
private JCheckBox var_javax_swing_JCheckBox_a;
|
||
private JPanel e;
|
||
private JTextField var_javax_swing_JTextField_d;
|
||
private JButton var_javax_swing_JButton_d;
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JTextField var_javax_swing_JTextField_a;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public JLabel var_javax_swing_JLabel_a;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_b;
|
||
public JLabel var_javax_swing_JLabel_b;
|
||
@Nullable
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public a(@Nullable Project project) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.b();
|
||
this.var_javax_swing_JTextField_b.setText(s.a());
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
CopyPasteManager.getInstance().setContents((Transferable)new StringSelection("uniqueCode:" + a.this.var_javax_swing_JTextField_b.getText() + ",email:" + a.this.var_javax_swing_JTextField_c.getText()));
|
||
}
|
||
});
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_c.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://www.brucege.com/pay/view");
|
||
}
|
||
}, null);
|
||
this.var_javax_swing_JButton_c.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
com.ccnode.codegenerator.af.d.a a2 = i.var_com_ccnode_codegenerator_ad_i_a.com_ccnode_codegenerator_af_d_a_a(a.this.var_javax_swing_JCheckBox_a.isSelected());
|
||
if (a2.java_lang_Boolean_a().booleanValue()) {
|
||
Messages.showInfoMessage((Project)a.this.var_com_intellij_openapi_project_Project_a, (String)A.a("connection.success"), (String)"success");
|
||
return;
|
||
}
|
||
Messages.showErrorDialog((Project)a.this.var_com_intellij_openapi_project_Project_a, (String)a2.java_lang_String_a(), (String)("can't connect to " + f.a));
|
||
}
|
||
});
|
||
this.void_a();
|
||
this.var_javax_swing_JButton_d.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
N.a.a(a.this.var_com_intellij_openapi_project_Project_a);
|
||
a.this.void_a();
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_b_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_b_a_a = a2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
d d2 = new d();
|
||
d2.a("mybatisCodeHelperPro");
|
||
com.ccnode.codegenerator.ah.a.a.a(d2);
|
||
if (d2.java_lang_Boolean_a().booleanValue()) {
|
||
this.var_com_ccnode_codegenerator_b_a_a.var_javax_swing_JLabel_a.setForeground(Color.RED);
|
||
this.var_com_ccnode_codegenerator_b_a_a.var_javax_swing_JLabel_a.setText("<22><><C0>߽<CF><DFBD><E2><B0>ɹ<B3> " + d2.d());
|
||
this.var_com_ccnode_codegenerator_b_a_a.void_a();
|
||
} else {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)d2.d(), (String)"Unbind error");
|
||
}
|
||
}
|
||
});
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://plugins.jetbrains.com/plugin/14522-mybatiscodehelperpro-marketplace-edition-");
|
||
}
|
||
}, null);
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_b.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/activate");
|
||
}
|
||
}, null);
|
||
this.var_javax_swing_JTabbedPane_a.setSelectedIndex(0);
|
||
this.setTitle(A.a("Activation"));
|
||
this.setOKButtonText(A.a("Activation"));
|
||
this.setCancelButtonText(A.a("Exit"));
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
com.ccnode.codegenerator.ah.a.b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
this.var_javax_swing_JTextField_d.setEditable(false);
|
||
if (b2.java_lang_Boolean_a().booleanValue()) {
|
||
this.var_javax_swing_JTextField_d.setForeground(new Color(46, 204, 113));
|
||
this.var_javax_swing_JTextField_d.setText(k.h(b2.java_util_Date_a()));
|
||
this.var_javax_swing_JPanel_a.setVisible(true);
|
||
String string = b2.java_lang_String_a();
|
||
if (string.length() == 36) {
|
||
string = StringUtils.abbreviateMiddle((String)string, (String)"****", (int)35);
|
||
}
|
||
this.var_javax_swing_JTextField_a.setText(string);
|
||
this.var_javax_swing_JTextField_a.setForeground(new Color(46, 204, 113));
|
||
} else {
|
||
this.var_javax_swing_JTextField_d.setForeground(Color.RED);
|
||
this.var_javax_swing_JTextField_d.setText(A.a("not.activated.yet"));
|
||
this.var_javax_swing_JPanel_a.setVisible(false);
|
||
}
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
@Nullable
|
||
public JComponent getPreferredFocusedComponent() {
|
||
return this.var_javax_swing_JTextArea_b;
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
Component component = this.var_javax_swing_JTabbedPane_a.getSelectedComponent();
|
||
if (component == this.var_javax_swing_JPanel_d && StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextArea_a.getText())) {
|
||
return new ValidationInfo("key should not be empty");
|
||
}
|
||
if (component == this.var_javax_swing_JPanel_c && StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextArea_b.getText())) {
|
||
return new ValidationInfo("key should not be empty");
|
||
}
|
||
return null;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
block12: {
|
||
Component component = this.var_javax_swing_JTabbedPane_a.getSelectedComponent();
|
||
if (component == this.var_javax_swing_JPanel_d) {
|
||
if (StringUtils.isNotBlank((CharSequence)this.var_javax_swing_JTextArea_a.getText())) {
|
||
c c2 = new c();
|
||
String string = this.var_javax_swing_JTextArea_a.getText().trim();
|
||
c2.a(string);
|
||
c2.c("mybatisCodeHelperPro");
|
||
String string2 = s.a();
|
||
c2.b(string2);
|
||
Set<String> set = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getInvalidOffLineKey();
|
||
if (set.contains(string)) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"<22><><BC><A4><BB>벻<C2><EBB2BB><D5><FD>", (String)"ʧ<><CAA7>");
|
||
return;
|
||
}
|
||
try {
|
||
boolean bl = com.ccnode.codegenerator.af.c.a(c2);
|
||
c2.b(s.b());
|
||
boolean bl2 = com.ccnode.codegenerator.af.c.a(c2);
|
||
c2.b(this.var_javax_swing_JTextField_b.getText());
|
||
boolean bl3 = com.ccnode.codegenerator.af.c.a(c2);
|
||
if (bl || bl2 || bl3) {
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(true);
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setUseFreeVersion(false);
|
||
Messages.showInfoMessage((Project)this.var_com_intellij_openapi_project_Project_a, (String)"<22><><BC><A4><BB>ɹ<B3>", (String)"<22>ɹ<B3>");
|
||
q_0.a();
|
||
this.void_a();
|
||
break block12;
|
||
}
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)("<22><><BC><A4><BB><EE><C2><EB><B4><ED>, <20><><BC><A4><BB><EE>Ϊ" + string + "\n Ψһ<CEA8><D2BB>Ϊ:" + string2 + " <20>뽫<C7><EBBDAB>Ϣ<C5><CFA2><B8>Ʒ<D6><C6B7><CB><CDB8><F8><D7><F7>"), (String)"ʧ<><CAA7>");
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)("<22><><BC><A4><BB>벻<C2><EBB2BB><D5><FD>" + ExceptionUtils.getStackTrace((Throwable)exception)), (String)"ʧ<><CAA7>");
|
||
}
|
||
}
|
||
} else {
|
||
com.ccnode.codegenerator.af.f f2 = null;
|
||
if (this.var_javax_swing_JCheckBox_a.isSelected()) {
|
||
f2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_af_f_a();
|
||
}
|
||
b b2 = new b();
|
||
String string = this.var_javax_swing_JTextArea_b.getText().trim();
|
||
b2.a(string);
|
||
b2.b(s.a());
|
||
b2.c(System.getProperty("os.name"));
|
||
b2.d(ApplicationInfo.getInstance().getBuild().asString());
|
||
b2.e("");
|
||
b2.a(f2);
|
||
b2.f("mybatisCodeHelperPro");
|
||
if (string.startsWith("free") && com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getAlreadyTrail() && !string.equals(com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getTrailKey())) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)A.a("hasTrail"), (String)"Validate Fail");
|
||
return;
|
||
}
|
||
com.ccnode.codegenerator.af.c.a(b2);
|
||
boolean bl = b2.java_lang_Boolean_a();
|
||
if (!bl) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)("the error msg is:" + b2.h()), (String)"Validate Fail");
|
||
Messages.showInfoMessage((Project)this.var_com_intellij_openapi_project_Project_a, (String)"If the error is from network, you can try set Intellij proxy turn off or turn on or Auto-Detect Proxy Setting Or use a VPN\n, if the error is code not right, you can contact with gejun123456@gmail.com or <><CEA2> gejun12311", (String)"Activation Info");
|
||
} else {
|
||
if (string.startsWith("free")) {
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setAlreadyTrail(true);
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setTrailKey(string);
|
||
}
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(true);
|
||
com.ccnode.codegenerator.H.e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setUseFreeVersion(false);
|
||
Messages.showInfoMessage((Project)this.var_com_intellij_openapi_project_Project_a, (String)A.a("validate.success"), (String)"Success");
|
||
q_0.a();
|
||
this.void_a();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JTabbedPane_a = new JTabbedPane();
|
||
jPanel.add((Component)this.var_javax_swing_JTabbedPane_a, new GridConstraints(4, 0, 1, 2, 0, 3, 3, 3, null, new Dimension(200, 200), null, 0, false));
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout((LayoutManager)new GridLayoutManager(5, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "onlineactivation"), this.var_javax_swing_JPanel_c);
|
||
this.var_javax_swing_JTextArea_b = new JTextArea();
|
||
this.var_javax_swing_JPanel_c.add((Component)this.var_javax_swing_JTextArea_b, new GridConstraints(2, 0, 1, 3, 0, 3, 4, 4, null, new Dimension(150, 50), null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_a.setSelected(false);
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", "useproxyfromidea"));
|
||
this.var_javax_swing_JPanel_c.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(3, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "onlinekey"));
|
||
this.var_javax_swing_JPanel_c.add((Component)jLabel, new GridConstraints(1, 0, 1, 2, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_c.add((Component)jPanel2, new GridConstraints(0, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "key.from.website"));
|
||
jPanel2.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_c = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_c, this.a("i18n/i18n", "buy"));
|
||
jPanel2.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_c, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_c.add((Component)jPanel3, new GridConstraints(4, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.a(this.var_javax_swing_JButton_c, this.a("i18n/i18n", "check.connection"));
|
||
jPanel3.add((Component)this.var_javax_swing_JButton_c, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel3.add((Component)spacer, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_b = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_b, this.a("i18n/i18n", "cantActivate"));
|
||
jPanel3.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_b, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_d = new JPanel();
|
||
this.var_javax_swing_JPanel_d.setLayout((LayoutManager)new GridLayoutManager(6, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "offlineactivation"), this.var_javax_swing_JPanel_d);
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "copy.send.to.gejun123456.gmail.com.or.<2E><>ϵ<CFB5><CEA2>gejun12311"));
|
||
this.var_javax_swing_JPanel_d.add((Component)jLabel3, new GridConstraints(0, 0, 1, 3, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_d.add((Component)jPanel4, new GridConstraints(1, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
this.a(jLabel4, this.a("i18n/i18n", "uniquecode"));
|
||
jPanel4.add((Component)jLabel4, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
this.var_javax_swing_JTextField_b.setEditable(false);
|
||
jPanel4.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
this.a(jLabel5, this.a("i18n/i18n", "email"));
|
||
jPanel4.add((Component)jLabel5, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
jPanel4.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(1, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_d.add((Component)jPanel5, new GridConstraints(2, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.var_javax_swing_JButton_b.setText("copy");
|
||
jPanel5.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer2 = new Spacer();
|
||
jPanel5.add((Component)spacer2, new GridConstraints(0, 0, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel6 = new JLabel();
|
||
this.a(jLabel6, this.a("i18n/i18n", "offline.key"));
|
||
this.var_javax_swing_JPanel_d.add((Component)jLabel6, new GridConstraints(4, 0, 1, 3, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JTextArea_a, new GridConstraints(5, 0, 1, 3, 0, 3, 4, 4, null, new Dimension(150, 50), null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "offlineunbind"));
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(3, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer3 = new Spacer();
|
||
this.var_javax_swing_JPanel_d.add((Component)spacer3, new GridConstraints(3, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.var_javax_swing_JLabel_a.setText("");
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(3, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.e = new JPanel();
|
||
this.e.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.e, new GridConstraints(0, 0, 1, 2, 1, 1, 3, 3, null, new Dimension(308, 44), null, 0, false));
|
||
this.var_javax_swing_JTextField_d = new JTextField();
|
||
this.e.add((Component)this.var_javax_swing_JTextField_d, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel7 = new JLabel();
|
||
this.a(jLabel7, this.a("i18n/i18n", "expiredate"));
|
||
this.e.add((Component)jLabel7, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel6 = new JPanel();
|
||
jPanel6.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel6, new GridConstraints(3, 0, 1, 2, 0, 3, 3, 3, null, new Dimension(24, 31), null, 0, false));
|
||
this.var_javax_swing_JButton_d = new JButton();
|
||
this.a(this.var_javax_swing_JButton_d, this.a("i18n/i18n", "unbind"));
|
||
jPanel6.add((Component)this.var_javax_swing_JButton_d, new GridConstraints(0, 1, 1, 1, 4, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel8 = new JLabel();
|
||
this.a(jLabel8, this.a("i18n/i18n", "you.need.unbind.when.you.change.computer.or.reinstall.operating.system"));
|
||
jPanel6.add((Component)jLabel8, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(1, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel9 = new JLabel();
|
||
this.a(jLabel9, this.a("i18n/i18n", "paidKey"));
|
||
this.var_javax_swing_JPanel_a.add((Component)jLabel9, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel10 = new JLabel();
|
||
jLabel10.setText("if you are buying plugin from jetbrain marketplace, please uninstall current plugin and download from ");
|
||
jPanel.add((Component)jLabel10, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setText("marketplace edition");
|
||
jPanel.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(2, 1, 1, 1, 8, 2, 3, 3, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Function
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.completion.JavaClassNameCompletionContributor
|
||
* com.intellij.codeInsight.completion.PrioritizedLookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElementBuilder
|
||
* com.intellij.openapi.module.ModuleUtilCore
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReferenceBase
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.search.GlobalSearchScopesCore
|
||
* com.intellij.psi.search.SearchScope
|
||
* com.intellij.psi.search.searches.AllClassesSearch
|
||
* com.intellij.psi.search.searches.ClassInheritorsSearch
|
||
* com.intellij.psi.util.PsiFormatUtil
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.Query
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.c.b;
|
||
import com.ccnode.codegenerator.c.c;
|
||
import com.google.common.base.Function;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.completion.JavaClassNameCompletionContributor;
|
||
import com.intellij.codeInsight.completion.PrioritizedLookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||
import com.intellij.openapi.module.ModuleUtilCore;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReferenceBase;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.search.GlobalSearchScopesCore;
|
||
import com.intellij.psi.search.SearchScope;
|
||
import com.intellij.psi.search.searches.AllClassesSearch;
|
||
import com.intellij.psi.search.searches.ClassInheritorsSearch;
|
||
import com.intellij.psi.util.PsiFormatUtil;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.Query;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends PsiReferenceBase<XmlAttributeValue> {
|
||
private Function<b, String> a = b2 -> b2.java_lang_String_a();
|
||
|
||
public a(@NotNull XmlAttributeValue xmlAttributeValue) {
|
||
super((PsiElement)xmlAttributeValue, true);
|
||
}
|
||
|
||
@Nullable
|
||
public PsiElement resolve() {
|
||
XmlAttributeValue xmlAttributeValue = (XmlAttributeValue)this.getElement();
|
||
return (PsiElement)c.a(xmlAttributeValue.getProject()).a((PsiElement)xmlAttributeValue, xmlAttributeValue.getValue()).orNull();
|
||
}
|
||
|
||
@NotNull
|
||
public Object[] getVariants() {
|
||
b b22;
|
||
c c2;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
Project project = ((XmlAttributeValue)this.getElement()).getProject();
|
||
if (((XmlAttributeValue)this.myElement).getParent() instanceof XmlAttribute && (c2 = (XmlAttribute)((XmlAttributeValue)this.myElement).getParent()).getName().equals("typeHandler")) {
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass("org.apache.ibatis.type.TypeHandler", GlobalSearchScope.allScope((Project)project));
|
||
if (psiClass != null) {
|
||
Query query = ClassInheritorsSearch.search((PsiClass)psiClass, (SearchScope)GlobalSearchScope.allScope((Project)project), (boolean)true);
|
||
Collection collection = query.findAll();
|
||
for (PsiClass psiClass2 : collection) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)JavaClassNameCompletionContributor.createClassLookupItem((PsiClass)psiClass2, (boolean)false), (double)0.8));
|
||
}
|
||
}
|
||
return arrayList.toArray(new LookupElement[arrayList.size()]);
|
||
}
|
||
c2 = c.a(project);
|
||
Collection<b> collection = c2.a(this.getElement());
|
||
for (b b22 : collection) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)LookupElementBuilder.create((String)b22.java_lang_String_a()).withTypeText("alias").withIcon(p.d()).withTailText(" " + PsiFormatUtil.getPackageDisplayName((PsiClass)b22.com_intellij_psi_PsiClass_a())), (double)1.0));
|
||
}
|
||
Project project2 = ((XmlAttributeValue)this.myElement).getProject();
|
||
b22 = ModuleUtilCore.findModuleForPsiElement((PsiElement)this.myElement);
|
||
if (b22 != null) {
|
||
Collection collection2 = AllClassesSearch.search((SearchScope)GlobalSearchScopesCore.projectProductionScope((Project)project2), (Project)project2).findAll();
|
||
for (PsiClass psiClass : collection2) {
|
||
if (psiClass.isInterface() || psiClass.isEnum()) continue;
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)JavaClassNameCompletionContributor.createClassLookupItem((PsiClass)psiClass, (boolean)false), (double)0.8));
|
||
}
|
||
}
|
||
return arrayList.toArray(new LookupElement[arrayList.size()]);
|
||
}
|
||
|
||
public boolean isSoft() {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.intellij.psi.PsiClass;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b {
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public b() {
|
||
}
|
||
|
||
public static b a(@NotNull PsiClass psiClass, @NotNull String string) {
|
||
return new b(psiClass, string);
|
||
}
|
||
|
||
public b(PsiClass psiClass, String string) {
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public PsiClass com_intellij_psi_PsiClass_a() {
|
||
return this.var_com_intellij_psi_PsiClass_a;
|
||
}
|
||
|
||
public void a(PsiClass psiClass) {
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (this == object) {
|
||
return true;
|
||
}
|
||
if (object == null || this.getClass() != object.getClass()) {
|
||
return false;
|
||
}
|
||
b b2 = (b)object;
|
||
if (this.var_java_lang_String_a != null ? !this.var_java_lang_String_a.equals(b2.var_java_lang_String_a) : b2.var_java_lang_String_a != null) {
|
||
return false;
|
||
}
|
||
return !(this.var_com_intellij_psi_PsiClass_a != null ? !this.var_com_intellij_psi_PsiClass_a.equals(b2.var_com_intellij_psi_PsiClass_a) : b2.var_com_intellij_psi_PsiClass_a != null);
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = this.var_com_intellij_psi_PsiClass_a != null ? this.var_com_intellij_psi_PsiClass_a.hashCode() : 0;
|
||
n2 = 31 * n2 + (this.var_java_lang_String_a != null ? this.var_java_lang_String_a.hashCode() : 0);
|
||
return n2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Optional
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.ac;
|
||
import com.ccnode.codegenerator.c.b;
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.ccnode.codegenerator.c.e;
|
||
import com.ccnode.codegenerator.c.j;
|
||
import com.ccnode.codegenerator.c.k;
|
||
import com.google.common.base.Optional;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private JavaPsiFacade var_com_intellij_psi_JavaPsiFacade_a;
|
||
private List<d> var_java_util_List_com_ccnode_codegenerator_c_d__a;
|
||
|
||
public static final c a(@NotNull Project project) {
|
||
return (c)ServiceManager.getService((Project)project, c.class);
|
||
}
|
||
|
||
public c(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_openapi_project_Project_a = Lists.newArrayList();
|
||
this.var_com_intellij_psi_JavaPsiFacade_a = JavaPsiFacade.getInstance((Project)project);
|
||
this.a();
|
||
}
|
||
|
||
private void a() {
|
||
j[] jArray;
|
||
for (j j2 : jArray = (j[])j.a.getExtensions()) {
|
||
this.a(j2.a(this.var_com_intellij_openapi_project_Project_a));
|
||
}
|
||
this.a(e.f(this.var_com_intellij_openapi_project_Project_a));
|
||
this.a(e.e(this.var_com_intellij_openapi_project_Project_a));
|
||
this.a(e.b(this.var_com_intellij_openapi_project_Project_a));
|
||
this.a(e.a(this.var_com_intellij_openapi_project_Project_a));
|
||
this.a(e.c(this.var_com_intellij_openapi_project_Project_a));
|
||
}
|
||
|
||
@NotNull
|
||
public Optional<PsiClass> a(@NotNull PsiElement psiElement, @NotNull String string) {
|
||
PsiClass psiClass = this.var_com_intellij_psi_JavaPsiFacade_a.findClass(string, ac.a.b(psiElement));
|
||
if (null != psiClass) {
|
||
return Optional.of((Object)psiClass);
|
||
}
|
||
String string2 = string.toLowerCase();
|
||
for (d d2 : this.var_com_intellij_openapi_project_Project_a) {
|
||
for (b b2 : d2.a(psiElement)) {
|
||
if (!b2.java_lang_String_a().toLowerCase().equals(string2)) continue;
|
||
return Optional.of((Object)b2.com_intellij_psi_PsiClass_a());
|
||
}
|
||
}
|
||
return Optional.absent();
|
||
}
|
||
|
||
public Set<String> a(PsiElement psiElement) {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
for (d d2 : this.var_com_intellij_openapi_project_Project_a) {
|
||
if (!(d2 instanceof k)) continue;
|
||
k k2 = (k)d2;
|
||
Collection<String> collection = k2.a(psiElement);
|
||
hashSet.addAll(collection);
|
||
}
|
||
return hashSet;
|
||
}
|
||
|
||
@NotNull
|
||
public Collection<b> a(@Nullable PsiElement psiElement) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (d d2 : this.var_com_intellij_openapi_project_Project_a) {
|
||
arrayList.addAll(d2.a(psiElement));
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
public Optional<b> a(@Nullable PsiClass psiClass) {
|
||
if (null == psiClass) {
|
||
return Optional.absent();
|
||
}
|
||
for (d d2 : this.var_com_intellij_openapi_project_Project_a) {
|
||
for (b b2 : d2.a((PsiElement)psiClass)) {
|
||
if (!b2.com_intellij_psi_PsiClass_a().equals(psiClass)) continue;
|
||
return Optional.of((Object)b2);
|
||
}
|
||
}
|
||
return Optional.absent();
|
||
}
|
||
|
||
public void a(@NotNull d d2) {
|
||
this.var_com_intellij_openapi_project_Project_a.add(d2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.ccnode.codegenerator.c.f;
|
||
import com.ccnode.codegenerator.c.g;
|
||
import com.ccnode.codegenerator.c.h;
|
||
import com.ccnode.codegenerator.c.i;
|
||
import com.ccnode.codegenerator.c.l;
|
||
import com.ccnode.codegenerator.c.m;
|
||
import com.intellij.openapi.project.Project;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class e {
|
||
@NotNull
|
||
public static d a(@NotNull Project project) {
|
||
return new i(project);
|
||
}
|
||
|
||
@NotNull
|
||
public static d b(@NotNull Project project) {
|
||
return new f(project);
|
||
}
|
||
|
||
@NotNull
|
||
public static d c(@NotNull Project project) {
|
||
return new l(project);
|
||
}
|
||
|
||
@NotNull
|
||
public static d d(@NotNull Project project) {
|
||
return new g(project);
|
||
}
|
||
|
||
@NotNull
|
||
public static d e(@NotNull Project project) {
|
||
return new h(project);
|
||
}
|
||
|
||
@NotNull
|
||
public static d f(@NotNull Project project) {
|
||
return new m(project);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Function
|
||
* com.google.common.base.Optional
|
||
* com.google.common.collect.Collections2
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiModifierListOwner
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.search.SearchScope
|
||
* com.intellij.psi.search.searches.AnnotatedElementsSearch
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.t;
|
||
import com.ccnode.codegenerator.c.b;
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.ccnode.codegenerator.d.a;
|
||
import com.google.common.base.Function;
|
||
import com.google.common.base.Optional;
|
||
import com.google.common.collect.Collections2;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiModifierListOwner;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.search.SearchScope;
|
||
import com.intellij.psi.search.searches.AnnotatedElementsSearch;
|
||
import java.util.Collection;
|
||
import java.util.Collections;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class f
|
||
extends d {
|
||
private static final Function a = new Function<PsiClass, b>(){
|
||
|
||
public b a(PsiClass psiClass) {
|
||
Optional<String> optional = t.a.c((PsiModifierListOwner)psiClass, com.ccnode.codegenerator.d.a.var_com_ccnode_codegenerator_d_a_b);
|
||
if (!optional.isPresent()) {
|
||
return null;
|
||
}
|
||
b b2 = new b();
|
||
b2.a(((String)optional.get()).toLowerCase());
|
||
b2.a(psiClass);
|
||
return b2;
|
||
}
|
||
|
||
public /* synthetic */ Object apply(Object object) {
|
||
return this.a((PsiClass)object);
|
||
}
|
||
};
|
||
|
||
public f(Project project) {
|
||
super(project);
|
||
}
|
||
|
||
public static final f com_ccnode_codegenerator_c_f_a(@NotNull Project project) {
|
||
return (f)project.getComponent(f.class);
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Set<b> a(@Nullable PsiElement psiElement) {
|
||
Optional<PsiClass> optional = com.ccnode.codegenerator.d.a.var_com_ccnode_codegenerator_d_a_b.a(this.a());
|
||
if (optional.isPresent()) {
|
||
Collection collection = AnnotatedElementsSearch.searchPsiClasses((PsiClass)((PsiClass)optional.get()), (SearchScope)GlobalSearchScope.allScope((Project)this.a())).findAll();
|
||
return Sets.newHashSet((Iterable)Collections2.transform((Collection)collection, (Function)a));
|
||
}
|
||
return Collections.emptySet();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Optional
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.module.ModuleManager
|
||
* com.intellij.openapi.module.ModuleUtilCore
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.spring.CommonSpringModel
|
||
* com.intellij.spring.SpringManager
|
||
* com.intellij.spring.SpringModelVisitorUtils
|
||
* com.intellij.spring.model.CommonSpringBean
|
||
* com.intellij.spring.model.SpringBeanPointer
|
||
* com.intellij.spring.model.utils.SpringPropertyUtils
|
||
* com.intellij.spring.model.xml.beans.SpringPropertyDefinition
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.t;
|
||
import com.ccnode.codegenerator.c.k;
|
||
import com.google.common.base.Optional;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.module.ModuleManager;
|
||
import com.intellij.openapi.module.ModuleUtilCore;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.spring.CommonSpringModel;
|
||
import com.intellij.spring.SpringManager;
|
||
import com.intellij.spring.SpringModelVisitorUtils;
|
||
import com.intellij.spring.model.CommonSpringBean;
|
||
import com.intellij.spring.model.SpringBeanPointer;
|
||
import com.intellij.spring.model.utils.SpringPropertyUtils;
|
||
import com.intellij.spring.model.xml.beans.SpringPropertyDefinition;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class g
|
||
extends k {
|
||
private static final String var_java_lang_String_a = "org.mybatis.spring.SqlSessionFactoryBean";
|
||
private static final String b = "typeAliasesPackage";
|
||
private ModuleManager var_com_intellij_openapi_module_ModuleManager_a;
|
||
private SpringManager var_com_intellij_spring_SpringManager_a;
|
||
|
||
public g(Project project) {
|
||
super(project);
|
||
this.var_com_intellij_openapi_module_ModuleManager_a = ModuleManager.getInstance((Project)project);
|
||
this.var_com_intellij_spring_SpringManager_a = SpringManager.getInstance((Project)project);
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Collection<String> a(@Nullable PsiElement psiElement) {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
if (psiElement == null) {
|
||
return hashSet;
|
||
}
|
||
Module module = ModuleUtilCore.findModuleForPsiElement((PsiElement)psiElement);
|
||
if (module == null) {
|
||
return hashSet;
|
||
}
|
||
List list = ModuleUtilCore.getAllDependentModules((Module)module);
|
||
for (CommonSpringModel commonSpringModel : this.var_com_intellij_spring_SpringManager_a.getCombinedModel(module).getRelatedModels()) {
|
||
this.a(hashSet, commonSpringModel);
|
||
}
|
||
for (CommonSpringModel commonSpringModel : list) {
|
||
for (CommonSpringModel commonSpringModel2 : this.var_com_intellij_spring_SpringManager_a.getCombinedModel((Module)commonSpringModel).getRelatedModels()) {
|
||
this.a(hashSet, commonSpringModel2);
|
||
}
|
||
}
|
||
return hashSet;
|
||
}
|
||
|
||
private void a(Set<String> set, CommonSpringModel commonSpringModel) {
|
||
Optional<PsiClass> optional = t.a.a(this.a(), var_java_lang_String_a);
|
||
if (optional.isPresent()) {
|
||
@NotNull Collection collection = SpringModelVisitorUtils.getAllDomBeans((CommonSpringModel)commonSpringModel);
|
||
PsiClass psiClass = (PsiClass)optional.get();
|
||
for (SpringBeanPointer springBeanPointer : collection) {
|
||
String string;
|
||
GenericDomValue genericDomValue;
|
||
SpringPropertyDefinition springPropertyDefinition;
|
||
PsiClass psiClass2;
|
||
if (!springBeanPointer.isValid() || (psiClass2 = springBeanPointer.getBeanClass()) == null || !psiClass2.equals(psiClass) || (springPropertyDefinition = SpringPropertyUtils.findPropertyByName((CommonSpringBean)springBeanPointer.getSpringBean(), (String)b)) == null || (genericDomValue = springPropertyDefinition.getValueElement()) == null || (string = genericDomValue.getStringValue()) == null) continue;
|
||
set.add(string);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.util.Processor
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.c.k;
|
||
import com.ccnode.codegenerator.dom.model.Package;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.util.Processor;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class h
|
||
extends k {
|
||
public h(Project project) {
|
||
super(project);
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Collection<String> a(@Nullable PsiElement psiElement) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
if (psiElement == null) {
|
||
return arrayList;
|
||
}
|
||
v.a(this.a(), new Processor<Package>(){
|
||
final /* synthetic */ ArrayList var_java_util_ArrayList_a;
|
||
final /* synthetic */ h var_com_ccnode_codegenerator_c_h_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_c_h_a = h2;
|
||
this.var_java_util_ArrayList_a = arrayList;
|
||
}
|
||
|
||
public boolean a(Package package_) {
|
||
this.var_java_util_ArrayList_a.add(package_.getName().getStringValue());
|
||
return true;
|
||
}
|
||
|
||
public /* synthetic */ boolean process(Object object) {
|
||
return this.a((Package)object);
|
||
}
|
||
}, psiElement);
|
||
return arrayList;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
import com.intellij.openapi.project.Project;
|
||
|
||
public interface j {
|
||
public static final ExtensionPointName<j> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.mybatisTypeAliasProvider");
|
||
|
||
public d a(Project var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiPackage
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.c.b;
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiPackage;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public abstract class k
|
||
extends d {
|
||
private JavaPsiFacade a;
|
||
|
||
public k(Project project) {
|
||
super(project);
|
||
this.a = JavaPsiFacade.getInstance((Project)project);
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Set<b> a(@Nullable PsiElement psiElement) {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
for (String string : this.a(psiElement)) {
|
||
if (null == string) continue;
|
||
PsiPackage psiPackage = this.a.findPackage(string);
|
||
this.a(psiPackage, hashSet);
|
||
}
|
||
return hashSet;
|
||
}
|
||
|
||
private void a(PsiPackage psiPackage, Set<b> set) {
|
||
if (null != psiPackage) {
|
||
this.a(set, psiPackage);
|
||
for (PsiPackage psiPackage2 : psiPackage.getSubPackages()) {
|
||
this.a(psiPackage2, set);
|
||
}
|
||
}
|
||
}
|
||
|
||
private void a(Set<b> set, PsiPackage psiPackage) {
|
||
for (PsiClass psiClass : psiPackage.getClasses()) {
|
||
this.a(set, psiClass, psiClass.getName());
|
||
}
|
||
}
|
||
|
||
@NotNull
|
||
public abstract Collection<String> a(@Nullable PsiElement var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiElement
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.c.k;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiElement;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class l
|
||
extends k {
|
||
private Project a;
|
||
|
||
public l(Project project) {
|
||
super(project);
|
||
this.a = project;
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Collection<String> a(@Nullable PsiElement psiElement) {
|
||
ProjectProfile projectProfile = e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.a);
|
||
String string = projectProfile.getTypeAliasPackages();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
if (StringUtils.isNotBlank((CharSequence)string)) {
|
||
String[] stringArray;
|
||
for (String string2 : stringArray = string.split(";")) {
|
||
if (!StringUtils.isNotBlank((CharSequence)string2)) continue;
|
||
arrayList.add(string2.trim());
|
||
}
|
||
}
|
||
return arrayList;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.util.Processor
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.c.b;
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.ccnode.codegenerator.dom.model.TypeAlias;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.util.Processor;
|
||
import java.util.HashSet;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class m
|
||
extends d {
|
||
public m(Project project) {
|
||
super(project);
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Set<b> a(@Nullable PsiElement psiElement) {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
v.a(this.a(), new Processor<TypeAlias>(){
|
||
final /* synthetic */ Set var_java_util_Set_a;
|
||
final /* synthetic */ m var_com_ccnode_codegenerator_c_m_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_c_m_a = m2;
|
||
this.var_java_util_Set_a = set;
|
||
}
|
||
|
||
public boolean a(TypeAlias typeAlias) {
|
||
this.var_com_ccnode_codegenerator_c_m_a.a(this.var_java_util_Set_a, (PsiClass)typeAlias.getType().getValue(), typeAlias.getAlias().getStringValue());
|
||
return true;
|
||
}
|
||
|
||
public /* synthetic */ boolean process(Object object) {
|
||
return this.a((TypeAlias)object);
|
||
}
|
||
});
|
||
return hashSet;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.lang.Language
|
||
* com.intellij.lang.properties.PropertiesLanguage
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.module.ModuleManager
|
||
* com.intellij.openapi.module.ModuleUtilCore
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.ModificationTracker
|
||
* com.intellij.openapi.util.UserDataHolder
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.impl.PsiJavaModuleModificationTracker
|
||
* com.intellij.psi.util.CachedValueProvider
|
||
* com.intellij.psi.util.CachedValueProvider$Result
|
||
* com.intellij.psi.util.CachedValuesManager
|
||
* com.intellij.psi.util.PsiModificationTracker
|
||
* com.intellij.spring.boot.model.SpringBootConfigValueSearcher
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.jetbrains.yaml.YAMLLanguage
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.b_0;
|
||
import com.ccnode.codegenerator.ad.f;
|
||
import com.ccnode.codegenerator.ad.t;
|
||
import com.ccnode.codegenerator.c.k;
|
||
import com.ccnode.codegenerator.j.a;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.lang.properties.PropertiesLanguage;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.module.ModuleManager;
|
||
import com.intellij.openapi.module.ModuleUtilCore;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.ModificationTracker;
|
||
import com.intellij.openapi.util.UserDataHolder;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.impl.PsiJavaModuleModificationTracker;
|
||
import com.intellij.psi.util.CachedValueProvider;
|
||
import com.intellij.psi.util.CachedValuesManager;
|
||
import com.intellij.psi.util.PsiModificationTracker;
|
||
import com.intellij.spring.boot.model.SpringBootConfigValueSearcher;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.jetbrains.yaml.YAMLLanguage;
|
||
|
||
public class n
|
||
extends k {
|
||
private static final String var_java_lang_String_a = "org.mybatis.spring.SqlSessionFactoryBean";
|
||
private static final String b = "typeAliasesPackage";
|
||
private ModuleManager var_com_intellij_openapi_module_ModuleManager_a;
|
||
|
||
public n(Project project) {
|
||
super(project);
|
||
this.var_com_intellij_openapi_module_ModuleManager_a = ModuleManager.getInstance((Project)project);
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public Collection<String> a(@Nullable PsiElement psiElement) {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
if (psiElement == null) {
|
||
return hashSet;
|
||
}
|
||
Project project = psiElement.getProject();
|
||
Module module = ModuleUtilCore.findModuleForPsiElement((PsiElement)psiElement);
|
||
if (module == null) {
|
||
return hashSet;
|
||
}
|
||
List list = ModuleUtilCore.getAllDependentModules((Module)module);
|
||
Set set = (Set)CachedValuesManager.getManager((Project)project).getCachedValue((UserDataHolder)project, (CachedValueProvider)new CachedValueProvider<Set<String>>(){
|
||
final /* synthetic */ Module var_com_intellij_openapi_module_Module_a;
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ n var_com_ccnode_codegenerator_c_n_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_c_n_a = n2;
|
||
this.var_com_intellij_openapi_module_Module_a = module;
|
||
this.var_java_util_List_a = list;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Nullable
|
||
public CachedValueProvider.Result<Set<String>> compute() {
|
||
ModificationTracker modificationTracker;
|
||
HashSet hashSet;
|
||
HashSet hashSet2 = Sets.newHashSet();
|
||
if (com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getValid()) {
|
||
hashSet = Sets.newHashSet();
|
||
modificationTracker = t.a.a(this.var_com_ccnode_codegenerator_c_n_a.a(), "com.baomidou.mybatisplus.core.mapper.BaseMapper");
|
||
this.var_com_ccnode_codegenerator_c_n_a.a(hashSet, this.var_com_intellij_openapi_module_Module_a, "mybatis.type-aliases-package");
|
||
if (modificationTracker.isPresent()) {
|
||
this.var_com_ccnode_codegenerator_c_n_a.a(hashSet, this.var_com_intellij_openapi_module_Module_a, "mybatis-plus.type-aliases-package");
|
||
}
|
||
for (Module module : this.var_java_util_List_a) {
|
||
this.var_com_ccnode_codegenerator_c_n_a.a(hashSet, module, "mybatis.type-aliases-package");
|
||
if (!modificationTracker.isPresent()) continue;
|
||
this.var_com_ccnode_codegenerator_c_n_a.a(hashSet, module, "mybatis-plus.type-aliases-package");
|
||
}
|
||
hashSet2.addAll(hashSet);
|
||
}
|
||
hashSet = (PsiModificationTracker)this.var_com_intellij_openapi_project_Project_a.getService(PsiModificationTracker.class);
|
||
modificationTracker = hashSet.forLanguage((Language)PropertiesLanguage.INSTANCE);
|
||
ModificationTracker modificationTracker2 = hashSet.forLanguage((Language)YAMLLanguage.INSTANCE);
|
||
return CachedValueProvider.Result.create((Object)hashSet2, (Object[])new Object[]{modificationTracker, modificationTracker2, PsiJavaModuleModificationTracker.getInstance((Project)this.var_com_intellij_openapi_project_Project_a)});
|
||
}
|
||
});
|
||
return set;
|
||
}
|
||
|
||
private void a(Set<String> set, Module module, String string) {
|
||
String string2 = SpringBootConfigValueSearcher.productionForAllProfiles((Module)module, (String)string).findValueText();
|
||
if (StringUtils.isNotBlank((String)string2)) {
|
||
Set<String> set2 = f.a(string2, ",; \t\n");
|
||
for (String string3 : set2) {
|
||
Set<String> set3 = b_0.a.a(string3, module.getProject());
|
||
set.addAll(set3);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.ccnode.codegenerator.c.j;
|
||
import com.ccnode.codegenerator.c.n;
|
||
import com.intellij.openapi.project.Project;
|
||
|
||
public class p
|
||
implements j {
|
||
@Override
|
||
public d a(Project project) {
|
||
return new n(project);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.ccnode.codegenerator.c.d;
|
||
import com.ccnode.codegenerator.c.g;
|
||
import com.ccnode.codegenerator.c.j;
|
||
import com.intellij.openapi.project.Project;
|
||
|
||
public class o
|
||
implements j {
|
||
@Override
|
||
public d a(Project project) {
|
||
return new g(project);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Optional
|
||
* com.google.common.collect.Iterables
|
||
* com.google.common.collect.Maps
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.d;
|
||
|
||
import com.google.common.base.Optional;
|
||
import com.google.common.collect.Iterables;
|
||
import com.google.common.collect.Maps;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import java.util.Map;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class a
|
||
implements Cloneable {
|
||
public static final a var_com_ccnode_codegenerator_d_a_a;
|
||
public static final a var_com_ccnode_codegenerator_d_a_b;
|
||
public static final a c;
|
||
public static final a d;
|
||
private final String var_java_lang_String_a;
|
||
private final String var_java_lang_String_b;
|
||
private Map<String, a> var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_d_a$a__a;
|
||
|
||
public a(@NotNull String string, @NotNull String string2) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_java_lang_String_b = string2;
|
||
this.var_com_ccnode_codegenerator_d_a_a = Maps.newHashMap();
|
||
}
|
||
|
||
private a b(String string, a a2) {
|
||
this.var_com_ccnode_codegenerator_d_a_a.put(string, a2);
|
||
return this;
|
||
}
|
||
|
||
public a a(@NotNull String string, @NotNull a a2) {
|
||
a a3 = this.com_ccnode_codegenerator_d_a_a();
|
||
a3.var_com_ccnode_codegenerator_d_a_a = Maps.newHashMap((Map)((Object)this.var_com_ccnode_codegenerator_d_a_a));
|
||
return a3.b(string, a2);
|
||
}
|
||
|
||
public a a(@NotNull a a2) {
|
||
return this.a("value", a2);
|
||
}
|
||
|
||
public String toString() {
|
||
StringBuilder stringBuilder = new StringBuilder(this.var_java_lang_String_a);
|
||
if (!Iterables.isEmpty(this.var_com_ccnode_codegenerator_d_a_a.entrySet())) {
|
||
stringBuilder.append(this.c());
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
private String c() {
|
||
Optional<String> optional = this.a();
|
||
return optional.isPresent() ? (String)optional.get() : this.d();
|
||
}
|
||
|
||
private String d() {
|
||
StringBuilder stringBuilder = new StringBuilder("(");
|
||
for (String string : this.var_com_ccnode_codegenerator_d_a_a.keySet()) {
|
||
stringBuilder.append(string);
|
||
stringBuilder.append(" = ");
|
||
stringBuilder.append(((a)this.var_com_ccnode_codegenerator_d_a_a.get(string)).toString());
|
||
stringBuilder.append(", ");
|
||
}
|
||
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
||
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
||
stringBuilder.append(")");
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
@NotNull
|
||
public Optional<PsiClass> a(@NotNull Project project) {
|
||
return Optional.fromNullable((Object)JavaPsiFacade.getInstance((Project)project).findClass(this.b(), GlobalSearchScope.allScope((Project)project)));
|
||
}
|
||
|
||
private Optional<String> a() {
|
||
try {
|
||
String string = (String)Iterables.getOnlyElement(this.var_com_ccnode_codegenerator_d_a_a.keySet());
|
||
StringBuilder stringBuilder = new StringBuilder("(");
|
||
stringBuilder.append(((a)this.var_com_ccnode_codegenerator_d_a_a.get(string)).toString());
|
||
stringBuilder.append(")");
|
||
return Optional.of((Object)stringBuilder.toString());
|
||
}
|
||
catch (Exception exception) {
|
||
return Optional.absent();
|
||
}
|
||
}
|
||
|
||
@NotNull
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
@NotNull
|
||
public String b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
protected a com_ccnode_codegenerator_d_a_a() {
|
||
try {
|
||
return (a)super.clone();
|
||
}
|
||
catch (CloneNotSupportedException cloneNotSupportedException) {
|
||
throw new IllegalStateException();
|
||
}
|
||
}
|
||
|
||
protected /* synthetic */ Object clone() throws CloneNotSupportedException {
|
||
return this.com_ccnode_codegenerator_d_a_a();
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_d_a_a = new a("@Param", "org.apache.ibatis.annotations.Param");
|
||
var_com_ccnode_codegenerator_d_a_b = new a("@Alias", "org.apache.ibatis.type.Alias");
|
||
c = new a("@Autowired", "org.springframework.beans.factory.annotation.Autowired");
|
||
d = new a("@Resource", "javax.annotation.Resource");
|
||
}
|
||
|
||
public static interface a {
|
||
}
|
||
|
||
public static class b
|
||
implements a {
|
||
private String a;
|
||
|
||
public b(@NotNull String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String toString() {
|
||
return "\"" + this.a + "\"";
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.d;
|
||
|
||
import java.lang.annotation.ElementType;
|
||
import java.lang.annotation.Retention;
|
||
import java.lang.annotation.RetentionPolicy;
|
||
import java.lang.annotation.Target;
|
||
|
||
@Retention(value=RetentionPolicy.SOURCE)
|
||
@Target(value={ElementType.TYPE})
|
||
public @interface b {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.DynamicBundle
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.bundle;
|
||
|
||
import com.intellij.DynamicBundle;
|
||
import java.util.Locale;
|
||
import java.util.ResourceBundle;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class MyBundle
|
||
extends DynamicBundle {
|
||
public MyBundle(@NotNull Class<?> clazz, @NotNull String string) {
|
||
super(clazz, string);
|
||
}
|
||
|
||
protected MyBundle(@NotNull String string) {
|
||
super(string);
|
||
}
|
||
|
||
public static ResourceBundle getBundle(@NotNull String string, @NotNull Class<?> clazz) {
|
||
Locale locale = DynamicBundle.getLocale();
|
||
if (!locale.equals(Locale.ENGLISH)) {
|
||
return DynamicBundle.getBundle((String)string, clazz);
|
||
}
|
||
return ResourceBundle.getBundle(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
*/
|
||
package com.ccnode.codegenerator.g;
|
||
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
|
||
public interface a {
|
||
public static final ExtensionPointName<a> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.databaseToolChecker");
|
||
|
||
public void a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.fileTypes.PlainTextFileType
|
||
* com.intellij.openapi.fileTypes.PlainTextLanguage
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.Pair
|
||
*/
|
||
package com.ccnode.codegenerator.g;
|
||
|
||
import com.ccnode.codegenerator.g.a;
|
||
import com.ccnode.codegenerator.g.d;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.fileTypes.PlainTextFileType;
|
||
import com.intellij.openapi.fileTypes.PlainTextLanguage;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.Pair;
|
||
|
||
public class b {
|
||
public static boolean a() {
|
||
d[] dArray = (d[])d.a.getExtensions();
|
||
return dArray.length > 0;
|
||
}
|
||
|
||
public static boolean b() {
|
||
a[] aArray = (a[])a.a.getExtensions();
|
||
return aArray.length > 0;
|
||
}
|
||
|
||
public static boolean c() {
|
||
return b.a() || b.b();
|
||
}
|
||
|
||
public static Pair<Language, FileType> a() {
|
||
d[] dArray = (d[])d.a.getExtensions();
|
||
if (dArray.length > 0) {
|
||
return dArray[0].a();
|
||
}
|
||
return Pair.create((Object)PlainTextLanguage.INSTANCE, (Object)PlainTextFileType.INSTANCE);
|
||
}
|
||
|
||
public static String a(String string, Project project) {
|
||
d[] dArray = (d[])d.a.getExtensions();
|
||
if (dArray.length > 0) {
|
||
return dArray[0].a(string, project);
|
||
}
|
||
return new com.ccnode.codegenerator.M.b.a().a(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.Pair
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
*/
|
||
package com.ccnode.codegenerator.g;
|
||
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.Pair;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
|
||
public interface d {
|
||
public static final ExtensionPointName<d> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.ultimateVersionChecker");
|
||
|
||
public void a();
|
||
|
||
public String a(XmlTag var1);
|
||
|
||
public String a(Project var1, XmlFile var2);
|
||
|
||
public String a(String var1, Project var2);
|
||
|
||
public Pair<Language, FileType> a();
|
||
|
||
public PsiReference[] a(PsiElement var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.gson.Gson
|
||
* com.intellij.openapi.application.ApplicationInfo
|
||
* com.intellij.openapi.diagnostic.Logger
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.util.ExceptionUtil
|
||
* okhttp3.MediaType
|
||
* okhttp3.OkHttpClient
|
||
* okhttp3.OkHttpClient$Builder
|
||
* okhttp3.Request
|
||
* okhttp3.Request$Builder
|
||
* okhttp3.RequestBody
|
||
* okhttp3.Response
|
||
* oshi.SystemInfo
|
||
* oshi.hardware.HardwareAbstractionLayer
|
||
*/
|
||
package com.ccnode.codegenerator.i;
|
||
|
||
import com.ccnode.codegenerator.ad.s;
|
||
import com.ccnode.codegenerator.af.c;
|
||
import com.ccnode.codegenerator.af.d.d;
|
||
import com.ccnode.codegenerator.ah.a.b;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.gson.Gson;
|
||
import com.intellij.openapi.application.ApplicationInfo;
|
||
import com.intellij.openapi.diagnostic.Logger;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.util.ExceptionUtil;
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Date;
|
||
import java.util.concurrent.TimeUnit;
|
||
import java.util.concurrent.atomic.AtomicBoolean;
|
||
import okhttp3.MediaType;
|
||
import okhttp3.OkHttpClient;
|
||
import okhttp3.Request;
|
||
import okhttp3.RequestBody;
|
||
import okhttp3.Response;
|
||
import oshi.SystemInfo;
|
||
import oshi.hardware.HardwareAbstractionLayer;
|
||
|
||
public class a {
|
||
private static AtomicBoolean var_java_util_concurrent_atomic_AtomicBoolean_a;
|
||
private static final Logger var_com_intellij_openapi_diagnostic_Logger_a;
|
||
|
||
private static void b() {
|
||
Profile profile;
|
||
long l2;
|
||
boolean bl;
|
||
b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
if (b2.var_java_lang_Boolean_a.booleanValue() && !(bl = com.ccnode.codegenerator.i.a.a(l2 = (profile = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a()).getUseD1()))) {
|
||
profile.setUseD1(new Date().getTime());
|
||
String string = b2.java_lang_String_a();
|
||
com.ccnode.codegenerator.i.a.b("send paidkey info to server:" + string);
|
||
try {
|
||
boolean bl2 = com.ccnode.codegenerator.i.a.boolean_a(string);
|
||
if (!bl2) {
|
||
c.a();
|
||
}
|
||
}
|
||
catch (Throwable throwable) {
|
||
com.ccnode.codegenerator.i.a.b("send paidkey info to server error:" + ExceptionUtil.getMessage((Throwable)throwable));
|
||
}
|
||
}
|
||
}
|
||
|
||
private static boolean a(long l2) {
|
||
Date date = new Date(l2);
|
||
Date date2 = new Date();
|
||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||
return simpleDateFormat.format(date2).equals(simpleDateFormat.format(date));
|
||
}
|
||
|
||
public static synchronized void a() {
|
||
if (!var_java_util_concurrent_atomic_AtomicBoolean_a.get()) {
|
||
new Thread(new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
com.ccnode.codegenerator.i.a.b();
|
||
}
|
||
}).start();
|
||
var_java_util_concurrent_atomic_AtomicBoolean_a.set(true);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
*/
|
||
private static boolean boolean_a(String string) {
|
||
SystemInfo systemInfo = new SystemInfo();
|
||
HardwareAbstractionLayer hardwareAbstractionLayer = systemInfo.getHardware();
|
||
String string2 = null;
|
||
String string3 = null;
|
||
try {
|
||
string2 = systemInfo.getHardware().getComputerSystem().getSerialNumber();
|
||
string3 = systemInfo.getHardware().getComputerSystem().getHardwareUUID();
|
||
}
|
||
catch (Throwable throwable) {
|
||
com.ccnode.codegenerator.i.a.b("get hardware info error:" + ExceptionUtil.getMessage((Throwable)throwable));
|
||
string2 = "unknown";
|
||
string3 = "unknown";
|
||
}
|
||
String string4 = s.a();
|
||
String string5 = ApplicationInfo.getInstance().getFullVersion();
|
||
String string6 = System.getProperty("os.name");
|
||
OkHttpClient.Builder builder = new OkHttpClient().newBuilder().connectTimeout(10L, TimeUnit.SECONDS).readTimeout(10L, TimeUnit.SECONDS).writeTimeout(5L, TimeUnit.SECONDS).retryOnConnectionFailure(true);
|
||
OkHttpClient okHttpClient = builder.build();
|
||
Gson gson = new Gson();
|
||
com.ccnode.codegenerator.af.e.d d2 = new com.ccnode.codegenerator.af.e.d();
|
||
d2.a(string);
|
||
d2.b(string4);
|
||
d2.c(string6);
|
||
d2.d(string2);
|
||
d2.e(string3);
|
||
d2.g(string5);
|
||
String string7 = System.getProperty("user.name");
|
||
d2.f(string7);
|
||
String string8 = gson.toJson((Object)d2);
|
||
RequestBody requestBody = RequestBody.create((MediaType)com.ccnode.codegenerator.af.b.a.var_okhttp3_MediaType_a, (String)string8);
|
||
Request request = new Request.Builder().url("http://www.brucege.com/mybatispaidinfo/reportAndCheckValid").post(requestBody).build();
|
||
try (Response response = null;){
|
||
response = okHttpClient.newCall(request).execute();
|
||
if (response.isSuccessful()) {
|
||
String string9 = response.body().string();
|
||
d d3 = (d)new Gson().fromJson(string9, d.class);
|
||
boolean bl = d3.boolean_a();
|
||
return bl;
|
||
}
|
||
com.ccnode.codegenerator.i.a.void_a("response not sucessful");
|
||
boolean bl = true;
|
||
return bl;
|
||
}
|
||
}
|
||
|
||
public static void void_a(String string) {
|
||
boolean bl = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDebugMode();
|
||
if (bl) {
|
||
Messages.showInfoMessage((String)string, (String)"debug message");
|
||
}
|
||
}
|
||
|
||
public static void b(String string) {
|
||
boolean bl = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDebugMode();
|
||
if (bl) {
|
||
var_com_intellij_openapi_diagnostic_Logger_a.info(string);
|
||
}
|
||
}
|
||
|
||
static {
|
||
var_java_util_concurrent_atomic_AtomicBoolean_a = new AtomicBoolean(false);
|
||
var_com_intellij_openapi_diagnostic_Logger_a = Logger.getInstance((String)"MybatisCodeHelperPro");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.i;
|
||
|
||
public class b {
|
||
public static String var_java_lang_String_a;
|
||
public static Boolean var_java_lang_Boolean_a;
|
||
public static Integer var_java_lang_Integer_a;
|
||
public static final String b = "MybatisCodeHelperPro";
|
||
|
||
public static String a() {
|
||
return var_java_lang_String_a;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_a = "3.3.5";
|
||
var_java_lang_Boolean_a = false;
|
||
var_java_lang_Integer_a = 28;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.components.BaseComponent
|
||
* com.intellij.openapi.components.PersistentStateComponent
|
||
* com.intellij.openapi.components.State
|
||
* com.intellij.openapi.components.Storage
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.DefaultState;
|
||
import com.ccnode.codegenerator.myconfigurable.PluginState;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.components.BaseComponent;
|
||
import com.intellij.openapi.components.PersistentStateComponent;
|
||
import com.intellij.openapi.components.State;
|
||
import com.intellij.openapi.components.Storage;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
@State(name="MyBatisCodeHelper", storages={@Storage(file="$APP_CONFIG$/MyBatisCodeHelper.xml")})
|
||
public class a
|
||
implements BaseComponent,
|
||
PersistentStateComponent<PluginState> {
|
||
private PluginState a;
|
||
|
||
public static a com_ccnode_codegenerator_j_a_a() {
|
||
return (a)ApplicationManager.getApplication().getComponent(a.class);
|
||
}
|
||
|
||
public static Profile com_ccnode_codegenerator_myconfigurable_Profile_a() {
|
||
return ((a)ApplicationManager.getApplication().getComponent(a.class)).com_ccnode_codegenerator_myconfigurable_PluginState_a().getDefaultProfile();
|
||
}
|
||
|
||
public void initComponent() {
|
||
}
|
||
|
||
public void disposeComponent() {
|
||
}
|
||
|
||
@NotNull
|
||
public String getComponentName() {
|
||
return "MyBatisCodeHelper";
|
||
}
|
||
|
||
public PluginState com_ccnode_codegenerator_myconfigurable_PluginState_a() {
|
||
if (this.a == null) {
|
||
this.a = new PluginState();
|
||
this.a.setProfile(DefaultState.createDefault());
|
||
}
|
||
return this.a;
|
||
}
|
||
|
||
public void a(PluginState pluginState) {
|
||
this.a = pluginState;
|
||
}
|
||
|
||
public /* synthetic */ void loadState(Object object) {
|
||
this.a((PluginState)object);
|
||
}
|
||
|
||
public /* synthetic */ Object getState() {
|
||
return this.com_ccnode_codegenerator_myconfigurable_PluginState_a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.ide.plugins.IdeaPluginDescriptor
|
||
* com.intellij.ide.plugins.PluginManager
|
||
* com.intellij.notification.Notification
|
||
* com.intellij.notification.NotificationAction
|
||
* com.intellij.notification.NotificationDisplayType
|
||
* com.intellij.notification.NotificationGroup
|
||
* com.intellij.notification.NotificationListener
|
||
* com.intellij.notification.NotificationType
|
||
* com.intellij.notification.Notifications$Bus
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.extensions.PluginId
|
||
* com.intellij.openapi.project.DumbAware
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.startup.StartupActivity
|
||
* com.intellij.openapi.util.registry.Registry
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.ad.i;
|
||
import com.ccnode.codegenerator.i.b;
|
||
import com.ccnode.codegenerator.j.a;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
||
import com.intellij.ide.plugins.PluginManager;
|
||
import com.intellij.notification.Notification;
|
||
import com.intellij.notification.NotificationAction;
|
||
import com.intellij.notification.NotificationDisplayType;
|
||
import com.intellij.notification.NotificationGroup;
|
||
import com.intellij.notification.NotificationListener;
|
||
import com.intellij.notification.NotificationType;
|
||
import com.intellij.notification.Notifications;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.extensions.PluginId;
|
||
import com.intellij.openapi.project.DumbAware;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.startup.StartupActivity;
|
||
import com.intellij.openapi.util.registry.Registry;
|
||
import java.net.URL;
|
||
import java.util.ArrayList;
|
||
import java.util.Calendar;
|
||
import java.util.Date;
|
||
import java.util.Locale;
|
||
import java.util.concurrent.TimeUnit;
|
||
import javax.swing.event.HyperlinkEvent;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class c
|
||
implements DumbAware,
|
||
StartupActivity {
|
||
private static final NotificationGroup a = new NotificationGroup("MybatisCodeHelper Notification", NotificationDisplayType.STICKY_BALLOON, true);
|
||
|
||
public void runActivity(@NotNull Project project) {
|
||
Boolean bl;
|
||
Object object;
|
||
try {
|
||
object = Registry.get((String)"psi.modification.tracker.per-language");
|
||
boolean bl2 = object.asBoolean();
|
||
if (!bl2) {
|
||
object.setValue(true);
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
object = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
String string = ((Profile)object).getCurrentLocale();
|
||
if (string.equals("<22><><D6><D0>")) {
|
||
Locale.setDefault(Locale.CHINA);
|
||
} else if (string.equals("English")) {
|
||
Locale.setDefault(Locale.ENGLISH);
|
||
} else if (string.equals("DEFAULT") && !(bl = b.var_java_lang_Boolean_a).booleanValue()) {
|
||
Locale.setDefault(Locale.CHINA);
|
||
}
|
||
i.var_com_ccnode_codegenerator_ad_i_a.void_a(com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDebugMode());
|
||
new Thread(() -> {
|
||
Cloneable cloneable;
|
||
com.ccnode.codegenerator.ah.a.a.void_a();
|
||
com.ccnode.codegenerator.i.a.a();
|
||
com.ccnode.codegenerator.ah.a.b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
if (!b2.java_lang_Boolean_a().booleanValue()) {
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(false);
|
||
cloneable = a.createNotification(A.a("MybatisCodeHelperProNotActivated"), A.a("MybatisCodeHelperActivateMsg", "https://brucege.com/pay/view"), NotificationType.WARNING, new NotificationListener(){
|
||
|
||
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent hyperlinkEvent) {
|
||
URL uRL = hyperlinkEvent.getURL();
|
||
BrowserUtil.browse((URL)uRL);
|
||
}
|
||
});
|
||
cloneable.addAction((AnAction)NotificationAction.createSimple((String)A.a("Activation"), (Runnable)new Runnable(){
|
||
final /* synthetic */ Notification var_com_intellij_notification_Notification_a;
|
||
final /* synthetic */ c var_com_ccnode_codegenerator_j_c_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_j_c_a = c2;
|
||
this.var_com_intellij_notification_Notification_a = notification;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
com.ccnode.codegenerator.b.a a2 = new com.ccnode.codegenerator.b.a(null);
|
||
boolean bl = a2.showAndGet();
|
||
com.ccnode.codegenerator.ah.a.b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
if (b2.java_lang_Boolean_a().booleanValue()) {
|
||
this.var_com_intellij_notification_Notification_a.expire();
|
||
}
|
||
}
|
||
}));
|
||
cloneable.addAction((AnAction)NotificationAction.createSimple((String)A.a("useFreeVersion"), (Runnable)new Runnable(){
|
||
final /* synthetic */ Notification var_com_intellij_notification_Notification_a;
|
||
final /* synthetic */ c var_com_ccnode_codegenerator_j_c_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_j_c_a = c2;
|
||
this.var_com_intellij_notification_Notification_a = notification;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setUseFreeVersion(true);
|
||
this.var_com_intellij_notification_Notification_a.expire();
|
||
}
|
||
}));
|
||
boolean bl = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getUseFreeVersion();
|
||
if (!bl) {
|
||
Notifications.Bus.notify((Notification)cloneable, (Project)project);
|
||
}
|
||
} else {
|
||
long l2;
|
||
long l3;
|
||
boolean bl;
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(true);
|
||
cloneable = b2.java_util_Date_a();
|
||
long l4 = c.a(new Date(), (Date)cloneable);
|
||
if (l4 < 2L && !(bl = this.a(l3 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getExpireNotifyDate(), l2 = new Date().getTime()))) {
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setExpireNotifyDate(l2);
|
||
Notification notification = a.createNotification(A.a("MybatisCodeHelperProGonnaExpire", l4), A.a("MybatisCodeHelperActivateMsg", "https://brucege.com/pay/view"), NotificationType.INFORMATION, new NotificationListener(){
|
||
|
||
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent hyperlinkEvent) {
|
||
URL uRL = hyperlinkEvent.getURL();
|
||
BrowserUtil.browse((URL)uRL);
|
||
}
|
||
});
|
||
notification.addAction((AnAction)NotificationAction.createSimple((String)A.a("Activation"), (Runnable)new Runnable(){
|
||
final /* synthetic */ Notification var_com_intellij_notification_Notification_a;
|
||
final /* synthetic */ c var_com_ccnode_codegenerator_j_c_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_j_c_a = c2;
|
||
this.var_com_intellij_notification_Notification_a = notification;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
com.ccnode.codegenerator.b.a a2 = new com.ccnode.codegenerator.b.a(null);
|
||
boolean bl = a2.showAndGet();
|
||
com.ccnode.codegenerator.ah.a.b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
if (b2.java_lang_Boolean_a().booleanValue()) {
|
||
this.var_com_intellij_notification_Notification_a.expire();
|
||
}
|
||
}
|
||
}));
|
||
notification.notify(project);
|
||
}
|
||
}
|
||
cloneable = Lists.newArrayList((Object[])new String[]{"cn.wuzhizhan.plugin.mybatis", "com.baomidou.plugin.idea.mybatisx", "com.github.mustfun.plugin.mybatis", "com.codesmagic.idea.minbatis", "edu.umontreal.hatchery", "com.baomidou.plugin.idea.mybatisPlus", "com.tianlei.plugin.mybatis", "cn.wuzhizhan.idea.mybatis.free-idea-mybatis"});
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
Notification notification = cloneable.iterator();
|
||
while (notification.hasNext()) {
|
||
IdeaPluginDescriptor ideaPluginDescriptor;
|
||
String string = (String)notification.next();
|
||
PluginId pluginId = PluginId.findId((String)string);
|
||
if (pluginId == null || !PluginManager.isPluginInstalled((PluginId)pluginId) || (ideaPluginDescriptor = PluginManager.getPlugin((PluginId)pluginId)) == null || !ideaPluginDescriptor.isEnabled()) continue;
|
||
String string2 = ideaPluginDescriptor.getName();
|
||
arrayList.add(string2);
|
||
}
|
||
if (arrayList.size() > 0) {
|
||
notification = a.createNotification(A.a("PluginConflictFound"), A.a("PluginCOnflictMessage", String.join((CharSequence)",", arrayList)), NotificationType.WARNING, new NotificationListener(){
|
||
|
||
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent hyperlinkEvent) {
|
||
URL uRL = hyperlinkEvent.getURL();
|
||
BrowserUtil.browse((URL)uRL);
|
||
}
|
||
});
|
||
Notifications.Bus.notify((Notification)notification, (Project)project);
|
||
}
|
||
}).start();
|
||
}
|
||
|
||
private boolean a(long l2, long l3) {
|
||
Calendar calendar = Calendar.getInstance();
|
||
calendar.setTimeInMillis(l2);
|
||
int n2 = calendar.get(1);
|
||
int n3 = calendar.get(2);
|
||
int n4 = calendar.get(5);
|
||
calendar.setTimeInMillis(l3);
|
||
int n5 = calendar.get(1);
|
||
int n6 = calendar.get(2);
|
||
int n7 = calendar.get(5);
|
||
return n2 == n5 && n3 == n6 && n4 == n7;
|
||
}
|
||
|
||
public static long a(Date date, Date date2) {
|
||
long l2 = Math.abs(date2.getTime() - date.getTime());
|
||
long l3 = TimeUnit.DAYS.convert(l2, TimeUnit.MILLISECONDS);
|
||
return l3;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
public class b<T>
|
||
extends ClassLoader {
|
||
public Class<T> a(String string, byte[] byArray, int n2, int n3) {
|
||
return super.defineClass(string, byArray, n2, n3);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.objectweb.asm.ClassWriter
|
||
* org.objectweb.asm.Label
|
||
* org.objectweb.asm.MethodVisitor
|
||
* org.objectweb.asm.Opcodes
|
||
* org.objectweb.asm.Type
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
import org.objectweb.asm.ClassWriter;
|
||
import org.objectweb.asm.Label;
|
||
import org.objectweb.asm.MethodVisitor;
|
||
import org.objectweb.asm.Opcodes;
|
||
import org.objectweb.asm.Type;
|
||
|
||
public class d
|
||
implements Opcodes {
|
||
public static byte[] a() throws Exception {
|
||
ClassWriter classWriter = new ClassWriter(0);
|
||
classWriter.visit(52, 33, "com/bruce/User", null, "java/lang/Object", null);
|
||
classWriter.visitSource("User.java", null);
|
||
MethodVisitor methodVisitor = classWriter.visitMethod(1, "<init>", "()V", null, null);
|
||
methodVisitor.visitCode();
|
||
Label label = new Label();
|
||
methodVisitor.visitLabel(label);
|
||
methodVisitor.visitLineNumber(11, label);
|
||
methodVisitor.visitVarInsn(25, 0);
|
||
methodVisitor.visitMethodInsn(183, "java/lang/Object", "<init>", "()V", false);
|
||
methodVisitor.visitInsn(177);
|
||
Label label2 = new Label();
|
||
methodVisitor.visitLabel(label2);
|
||
methodVisitor.visitLocalVariable("this", "Lcom/bruce/User;", null, label, label2, 0);
|
||
methodVisitor.visitMaxs(1, 1);
|
||
methodVisitor.visitEnd();
|
||
methodVisitor = classWriter.visitMethod(9, "main", "([Ljava/lang/String;)V", null, null);
|
||
methodVisitor.visitCode();
|
||
label = new Label();
|
||
methodVisitor.visitLabel(label);
|
||
methodVisitor.visitLineNumber(13, label);
|
||
methodVisitor.visitMethodInsn(184, "com/bruce/User", "show", "()Ljava/lang/Object;", false);
|
||
methodVisitor.visitInsn(87);
|
||
label2 = new Label();
|
||
methodVisitor.visitLabel(label2);
|
||
methodVisitor.visitLineNumber(14, label2);
|
||
methodVisitor.visitInsn(177);
|
||
Label label3 = new Label();
|
||
methodVisitor.visitLabel(label3);
|
||
methodVisitor.visitLocalVariable("args", "[Ljava/lang/String;", null, label, label3, 0);
|
||
methodVisitor.visitMaxs(1, 1);
|
||
methodVisitor.visitEnd();
|
||
methodVisitor = classWriter.visitMethod(10, "show", "()Ljava/lang/Object;", null, null);
|
||
methodVisitor.visitCode();
|
||
label = new Label();
|
||
label2 = new Label();
|
||
label3 = new Label();
|
||
methodVisitor.visitTryCatchBlock(label, label2, label3, "java/lang/Exception");
|
||
methodVisitor.visitLabel(label);
|
||
methodVisitor.visitLineNumber(18, label);
|
||
methodVisitor.visitLdcInsn((Object)Type.getType((String)"Lcom/janetfilter/plugins/power/ArgsFilter;"));
|
||
methodVisitor.visitLdcInsn((Object)"l2cached");
|
||
methodVisitor.visitMethodInsn(182, "java/lang/Class", "getDeclaredField", "(Ljava/lang/String;)Ljava/lang/reflect/Field;", false);
|
||
methodVisitor.visitVarInsn(58, 0);
|
||
Label label4 = new Label();
|
||
methodVisitor.visitLabel(label4);
|
||
methodVisitor.visitLineNumber(19, label4);
|
||
methodVisitor.visitVarInsn(25, 0);
|
||
methodVisitor.visitInsn(4);
|
||
methodVisitor.visitMethodInsn(182, "java/lang/reflect/Field", "setAccessible", "(Z)V", false);
|
||
Label label5 = new Label();
|
||
methodVisitor.visitLabel(label5);
|
||
methodVisitor.visitLineNumber(20, label5);
|
||
methodVisitor.visitVarInsn(25, 0);
|
||
methodVisitor.visitInsn(1);
|
||
methodVisitor.visitMethodInsn(182, "java/lang/reflect/Field", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false);
|
||
methodVisitor.visitVarInsn(58, 1);
|
||
Label label6 = new Label();
|
||
methodVisitor.visitLabel(label6);
|
||
methodVisitor.visitLineNumber(21, label6);
|
||
methodVisitor.visitVarInsn(25, 1);
|
||
methodVisitor.visitLabel(label2);
|
||
methodVisitor.visitInsn(176);
|
||
methodVisitor.visitLabel(label3);
|
||
methodVisitor.visitLineNumber(22, label3);
|
||
methodVisitor.visitFrame(4, 0, null, 1, new Object[]{"java/lang/Exception"});
|
||
methodVisitor.visitVarInsn(58, 0);
|
||
Label label7 = new Label();
|
||
methodVisitor.visitLabel(label7);
|
||
methodVisitor.visitLineNumber(23, label7);
|
||
methodVisitor.visitTypeInsn(187, "java/lang/RuntimeException");
|
||
methodVisitor.visitInsn(89);
|
||
methodVisitor.visitLdcInsn((Object)"field not exist");
|
||
methodVisitor.visitVarInsn(25, 0);
|
||
methodVisitor.visitMethodInsn(183, "java/lang/RuntimeException", "<init>", "(Ljava/lang/String;Ljava/lang/Throwable;)V", false);
|
||
methodVisitor.visitInsn(191);
|
||
Label label8 = new Label();
|
||
methodVisitor.visitLabel(label8);
|
||
methodVisitor.visitLocalVariable("l2cached", "Ljava/lang/reflect/Field;", null, label4, label3, 0);
|
||
methodVisitor.visitLocalVariable("o", "Ljava/lang/Object;", null, label6, label3, 1);
|
||
methodVisitor.visitLocalVariable("ex", "Ljava/lang/Exception;", null, label7, label8, 0);
|
||
methodVisitor.visitMaxs(4, 2);
|
||
methodVisitor.visitEnd();
|
||
classWriter.visitEnd();
|
||
return classWriter.toByteArray();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
public class a {
|
||
public static final String a = "Junit4";
|
||
public static final String b = "Junit5";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
public class b {
|
||
public static final String a = "MybatisCodeHelperCheck";
|
||
public static final String b = "MybatisCodeHelperPro";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
public class c {
|
||
public static final String a = "BaseResultMap";
|
||
public static final String b = "Base_Column_List";
|
||
public static final String c = "Join_Column_List";
|
||
public static final String d = "JoinResultMap";
|
||
public static final String e = "com.github.pagehelper.PageHelper";
|
||
public static final String f = "com.github.pagehelper.Page";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
import java.util.HashSet;
|
||
import java.util.Set;
|
||
|
||
public class e {
|
||
public static Set<String> a = new HashSet<String>(){
|
||
{
|
||
this.add("org.apache.ibatis.annotations.Select");
|
||
this.add("org.apache.ibatis.annotations.Update");
|
||
this.add("org.apache.ibatis.annotations.Delete");
|
||
this.add("org.apache.ibatis.annotations.Insert");
|
||
this.add("org.apache.ibatis.annotations.InsertProvider");
|
||
this.add("org.apache.ibatis.annotations.DeleteProvider");
|
||
this.add("org.apache.ibatis.annotations.SelectProvider");
|
||
this.add("org.apache.ibatis.annotations.UpdateProvider");
|
||
this.add("org.apache.ibatis.annotations.Flush");
|
||
}
|
||
};
|
||
public static Set<String> b = new HashSet<String>(){
|
||
{
|
||
this.add("org.apache.ibatis.annotations.Select");
|
||
this.add("org.apache.ibatis.annotations.Update");
|
||
this.add("org.apache.ibatis.annotations.Delete");
|
||
this.add("org.apache.ibatis.annotations.Insert");
|
||
}
|
||
};
|
||
public static Set<String> c = new HashSet<String>(){
|
||
{
|
||
this.add("find");
|
||
this.add("select");
|
||
this.add("query");
|
||
this.add("get");
|
||
this.add("list");
|
||
}
|
||
};
|
||
public static Set<String> d = new HashSet<String>(){
|
||
{
|
||
this.add("update");
|
||
this.add("modify");
|
||
}
|
||
};
|
||
public static Set<String> e = new HashSet<String>(){
|
||
{
|
||
this.add("delete");
|
||
this.add("remove");
|
||
}
|
||
};
|
||
public static Set<String> f = new HashSet<String>(){
|
||
{
|
||
this.add("count");
|
||
}
|
||
};
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
import com.google.common.collect.Lists;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d {
|
||
public static final String var_java_lang_String_a = "<!--";
|
||
public static final String var_java_lang_String_b = "-->";
|
||
public static final String c = "@Table";
|
||
public static final String d = "resultMap";
|
||
public static final String e = "resultType";
|
||
public static final String f = "select";
|
||
public static final String g = "insert";
|
||
public static final String h = "update";
|
||
public static final String i = "delete";
|
||
public static final String j = "sql";
|
||
public static final String k = "refid";
|
||
public static final String l = "include";
|
||
public static final String m = "selectKey";
|
||
public static final String n = "foreach";
|
||
public static final String o = "id";
|
||
public static final String p = "columnPrefix";
|
||
public static final String q = "choose";
|
||
public static final String r = "extends";
|
||
public static final String s = "if";
|
||
public static final String t = "when";
|
||
public static final String u = "otherwise";
|
||
public static final String v = "property";
|
||
public static final String w = "column";
|
||
public static final String x = "jdbcType";
|
||
public static final String y = "keyProperty";
|
||
public static final String z = "result";
|
||
public static final String A = "test";
|
||
public static final String B = "type";
|
||
public static final String C = "javaType";
|
||
public static final String D = "ofType";
|
||
public static final String E = "collection";
|
||
public static final String F = "item";
|
||
public static final String G = "association";
|
||
public static final String H = "useGeneratedKeys";
|
||
public static final String I = "keyProperty";
|
||
public static final String J = "_parameter";
|
||
public static final String K = "namespace";
|
||
public static final String L = "mapper";
|
||
public static final String M = "prefix";
|
||
public static final String N = "suffix";
|
||
public static final String O = "where";
|
||
public static final String P = "open";
|
||
public static final String Q = "close";
|
||
public static final String R = "set";
|
||
public static final String S = "jdbcType";
|
||
public static final String T = "typeHandler";
|
||
public static final String U = "resultMap";
|
||
public static final String V = "mode";
|
||
public static final String W = "numericScale";
|
||
public static final String X = "jdbcTypeName";
|
||
public static final List<String> var_java_util_List_java_lang_String__a;
|
||
public static final String Y = "org.apache.ibatis.annotations.Results";
|
||
public static final String Z = "org.apache.ibatis.annotations.Result";
|
||
public static final String aa = "org.apache.ibatis.annotations.ResultType";
|
||
public static Set<String> var_java_util_Set_java_lang_String__a;
|
||
public static Set<String> var_java_util_Set_java_lang_String__b;
|
||
public static final String ab = "bind";
|
||
public static final String ac = "name";
|
||
@NotNull
|
||
public static final String ad = "value";
|
||
@Nullable
|
||
public static final String ae = "discriminator";
|
||
public static List<String> var_java_util_List_java_lang_String__b;
|
||
@Nullable
|
||
public static final String af = "index";
|
||
|
||
static {
|
||
var_java_lang_String_a = Lists.newArrayList((Object[])new String[]{"jdbcType", C, T, "resultMap", V, W, X});
|
||
var_java_lang_String_a = new HashSet<String>(){
|
||
{
|
||
this.add(com.ccnode.codegenerator.k.d.g);
|
||
this.add(com.ccnode.codegenerator.k.d.h);
|
||
this.add(com.ccnode.codegenerator.k.d.i);
|
||
this.add(com.ccnode.codegenerator.k.d.f);
|
||
}
|
||
};
|
||
var_java_lang_String_b = new HashSet<String>(){
|
||
{
|
||
this.add(com.ccnode.codegenerator.k.d.g);
|
||
this.add(com.ccnode.codegenerator.k.d.h);
|
||
this.add(com.ccnode.codegenerator.k.d.i);
|
||
this.add(com.ccnode.codegenerator.k.d.f);
|
||
this.add(com.ccnode.codegenerator.k.d.j);
|
||
}
|
||
};
|
||
var_java_lang_String_b = Lists.newArrayList((Object[])new String[]{"IN", "OUT", "INOUT"});
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
public final class g
|
||
extends Enum<g> {
|
||
public static final /* enum */ g var_com_ccnode_codegenerator_k_g_a;
|
||
public static final /* enum */ g b;
|
||
public static final /* enum */ g c;
|
||
public static final /* enum */ g d;
|
||
private String var_java_lang_String_a;
|
||
private static final /* synthetic */ g[] var_com_ccnode_codegenerator_k_g_arr_a;
|
||
|
||
public static g[] com_ccnode_codegenerator_k_g_arr_a() {
|
||
return (g[])var_com_ccnode_codegenerator_k_g_arr_a.clone();
|
||
}
|
||
|
||
public static g a(String string) {
|
||
return Enum.valueOf(g.class, string);
|
||
}
|
||
|
||
private g(String string2) {
|
||
this.var_java_lang_String_a = string2;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
private static /* synthetic */ g[] b() {
|
||
return new g[]{var_com_ccnode_codegenerator_k_g_a, b, c, d};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_k_g_a = new g("select");
|
||
b = new g("update");
|
||
c = new g("delete");
|
||
d = new g("insert");
|
||
var_com_ccnode_codegenerator_k_g_arr_a = g.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiField
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import com.intellij.psi.PsiField;
|
||
import java.util.List;
|
||
|
||
public class a {
|
||
private List<PsiField> var_java_util_List_com_intellij_psi_PsiField__a;
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public List<PsiField> a() {
|
||
return this.var_java_util_List_com_intellij_psi_PsiField__a;
|
||
}
|
||
|
||
public void a(List<PsiField> list) {
|
||
this.var_java_util_List_com_intellij_psi_PsiField__a = list;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.l.a.c;
|
||
import com.ccnode.codegenerator.l.a.c.a;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b {
|
||
private static Map<String, c> var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_l_a_c__a;
|
||
private static com.ccnode.codegenerator.j.a var_com_ccnode_codegenerator_j_a_a;
|
||
|
||
@NotNull
|
||
public static c a(String string) {
|
||
return var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_l_a_c__a.get(string);
|
||
}
|
||
|
||
public static boolean boolean_a() {
|
||
return var_com_ccnode_codegenerator_j_a_a.com_ccnode_codegenerator_myconfigurable_PluginState_a().getDefaultProfile().getGenerateWithIfTest();
|
||
}
|
||
|
||
public static Profile com_ccnode_codegenerator_myconfigurable_Profile_a() {
|
||
return var_com_ccnode_codegenerator_j_a_a.com_ccnode_codegenerator_myconfigurable_PluginState_a().getDefaultProfile();
|
||
}
|
||
|
||
public static String a(String string, String string2) {
|
||
return n.java_lang_String_a(string, string2);
|
||
}
|
||
|
||
static {
|
||
var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_l_a_c__a = new HashMap<String, c>(){
|
||
{
|
||
this.put("MySql", new com.ccnode.codegenerator.l.a.a.b());
|
||
this.put("Oracle", new com.ccnode.codegenerator.l.a.b.b());
|
||
this.put("Sqlite", new com.ccnode.codegenerator.l.a.d.b());
|
||
this.put("PostgreSQL", new a());
|
||
this.put("SqlServer", new com.ccnode.codegenerator.l.a.e.b());
|
||
}
|
||
};
|
||
var_com_ccnode_codegenerator_j_a_a = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_j_a_a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import com.ccnode.codegenerator.G.d.d.a;
|
||
import java.util.Map;
|
||
|
||
public class c {
|
||
public static String a(a a2) {
|
||
return a2.a() + a2.b();
|
||
}
|
||
|
||
public static String a(Map<String, String> map, String string, String string2) {
|
||
switch (string) {
|
||
case "max":
|
||
case "min": {
|
||
return map.get(string2);
|
||
}
|
||
case "avg":
|
||
case "sum": {
|
||
return "java.math.BigDecimal";
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
public class d {
|
||
private String a;
|
||
private String b;
|
||
private String c;
|
||
private String d;
|
||
|
||
public String a() {
|
||
return this.c;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.c = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String c() {
|
||
return this.b;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String d() {
|
||
return this.d;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.d = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.psi.PsiClass
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import com.ccnode.codegenerator.G.d.d.a;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.freemarker.dto.GenClassInfo;
|
||
import com.ccnode.codegenerator.freemarker.dto.NewClassFieldInfo;
|
||
import com.ccnode.codegenerator.l.c;
|
||
import com.ccnode.codegenerator.l.d;
|
||
import com.ccnode.codegenerator.n.b.a.b;
|
||
import com.ccnode.codegenerator.n.q;
|
||
import com.ccnode.codegenerator.q.e_0;
|
||
import com.ccnode.codegenerator.w.b_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.psi.PsiClass;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.util.ArrayList;
|
||
import java.util.HashSet;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class e
|
||
extends DialogWrapper {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_G_d_d_a__a;
|
||
private Map<String, String> var_java_util_Map_java_lang_String,_java_lang_String__a;
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private List<d> var_java_util_List_com_ccnode_codegenerator_l_d__b;
|
||
private List<b> var_java_util_List_com_ccnode_codegenerator_n_b_a_b__c = new ArrayList<b>();
|
||
private e_0 var_com_ccnode_codegenerator_q_e_0_a;
|
||
private JTable var_javax_swing_JTable_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JTextField var_javax_swing_JTextField_c;
|
||
private String var_java_lang_String_c;
|
||
private GenClassInfo var_com_ccnode_codegenerator_freemarker_dto_GenClassInfo_a;
|
||
private e_0 var_com_ccnode_codegenerator_q_e_0_b;
|
||
|
||
public e(Project project, List<a> list, Map<String, String> map, String string, e_0 e_02, PsiClass psiClass) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_openapi_project_Project_a = list;
|
||
this.var_com_intellij_openapi_project_Project_a = map;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_ccnode_codegenerator_q_e_0_a = e_02;
|
||
this.var_java_lang_String_b = this.a(list, map, e_02);
|
||
String string2 = "";
|
||
if (psiClass != null) {
|
||
string2 = psiClass.getContainingFile().getVirtualFile().getParent().getPath();
|
||
}
|
||
this.var_javax_swing_JTextField_a = new JTextField(string2);
|
||
this.var_javax_swing_JTextField_c = new JTextField(n.g(string + "Result"));
|
||
this.var_javax_swing_JTextField_b = new JTextField(string + "Result");
|
||
this.var_javax_swing_JTable_a = new JTable(e.a((List<d>)((Object)this.var_java_lang_String_b)), new String[]{"columnName", "fieldName", "fieldType"}){
|
||
|
||
@Override
|
||
public boolean isCellEditable(int n2, int n3) {
|
||
return n3 == 1;
|
||
}
|
||
};
|
||
this.var_javax_swing_JTable_a.getTableHeader().setReorderingAllowed(false);
|
||
this.setTitle("create new Class for the result");
|
||
this.init();
|
||
}
|
||
|
||
private static Object[][] a(List<d> list) {
|
||
Object[][] objectArray = new Object[list.size()][];
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
objectArray[i2] = new String[3];
|
||
objectArray[i2][0] = list.get(i2).a();
|
||
objectArray[i2][1] = list.get(i2).b();
|
||
objectArray[i2][2] = list.get(i2).c();
|
||
}
|
||
return objectArray;
|
||
}
|
||
|
||
private List<d> a(List<a> list, Map<String, String> map, e_0 e_02) {
|
||
ArrayList<d> arrayList = new ArrayList<d>();
|
||
for (a a2 : list) {
|
||
Object object;
|
||
Object object2;
|
||
if (a2.a() == null) {
|
||
object2 = new d();
|
||
object = e_02.java_lang_String_a(a2.b());
|
||
((d)object2).b(a2.b());
|
||
((d)object2).c(map.get(a2.b()));
|
||
((d)object2).a((String)object);
|
||
arrayList.add((d)object2);
|
||
continue;
|
||
}
|
||
object2 = com.ccnode.codegenerator.l.c.a(a2);
|
||
object = new d();
|
||
((d)object).a((String)object2);
|
||
((d)object).b((String)object2);
|
||
((d)object).c(com.ccnode.codegenerator.l.c.a(map, a2.a(), a2.b()));
|
||
arrayList.add((d)object);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
int n2 = 0;
|
||
gridBagConstraints.anchor = 18;
|
||
gridBagConstraints.fill = 1;
|
||
gridBagConstraints.gridwidth = 1;
|
||
gridBagConstraints.weightx = 1.0;
|
||
gridBagConstraints.weighty = 1.0;
|
||
gridBagConstraints.gridy = n2++;
|
||
gridBagConstraints.gridx = 0;
|
||
jPanel.add((Component)new JLabel("className"), gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_c, gridBagConstraints);
|
||
gridBagConstraints.gridy = 1;
|
||
gridBagConstraints.gridx = 0;
|
||
jPanel.add((Component)new JLabel("resultMapId:"), gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_b, gridBagConstraints);
|
||
gridBagConstraints.gridy = 3;
|
||
gridBagConstraints.gridx = 0;
|
||
jPanel.add((Component)new JLabel(" class location:"), gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, gridBagConstraints);
|
||
gridBagConstraints.gridy = 4;
|
||
gridBagConstraints.gridx = 1;
|
||
JScrollPane jScrollPane = new JScrollPane(this.var_javax_swing_JTable_a);
|
||
jPanel.add((Component)jScrollPane, gridBagConstraints);
|
||
return jPanel;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
String string = this.var_javax_swing_JTextField_c.getText();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"the className is empty, please reinput", (String)"validefail");
|
||
return;
|
||
}
|
||
String string2 = this.var_javax_swing_JTextField_a.getText();
|
||
String string3 = b_0.a.a(this.var_com_intellij_openapi_project_Project_a, string2);
|
||
int n2 = this.var_javax_swing_JTable_a.getRowCount();
|
||
HashSet hashSet = Sets.newHashSet();
|
||
GenClassInfo genClassInfo = new GenClassInfo();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
this.var_com_ccnode_codegenerator_q_e_0_b = new e_0();
|
||
this.var_com_ccnode_codegenerator_q_e_0_b.void_a(this.var_javax_swing_JTextField_b.getText());
|
||
LinkedHashMap<String, String> linkedHashMap = new LinkedHashMap<String, String>();
|
||
LinkedHashMap<String, String> linkedHashMap2 = new LinkedHashMap<String, String>();
|
||
this.var_com_ccnode_codegenerator_q_e_0_b.a(linkedHashMap2);
|
||
this.var_com_ccnode_codegenerator_q_e_0_b.b(linkedHashMap);
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string4 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 0);
|
||
String string5 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string6 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 2);
|
||
linkedHashMap.put(string5, string4);
|
||
linkedHashMap2.put(string5.toLowerCase(), string4);
|
||
NewClassFieldInfo newClassFieldInfo = new NewClassFieldInfo();
|
||
newClassFieldInfo.setFieldName(string5);
|
||
newClassFieldInfo.setFieldShortType(q.b(string6));
|
||
if (this.a(string6)) {
|
||
hashSet.add(string6);
|
||
}
|
||
arrayList.add(newClassFieldInfo);
|
||
}
|
||
genClassInfo.setClassFullPath(string2 + "/" + string + ".java");
|
||
genClassInfo.setClassFieldInfos(arrayList);
|
||
genClassInfo.setClassName(string);
|
||
genClassInfo.setClassPackageName(string3);
|
||
genClassInfo.setImportList(hashSet);
|
||
this.var_com_ccnode_codegenerator_freemarker_dto_GenClassInfo_a = genClassInfo;
|
||
this.var_java_lang_String_c = string3 + "." + string;
|
||
super.doOKAction();
|
||
}
|
||
|
||
private boolean a(String string) {
|
||
return string != null && !string.startsWith("java.lang");
|
||
}
|
||
|
||
public List<b> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__c;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_c;
|
||
}
|
||
|
||
public e_0 com_ccnode_codegenerator_q_e_0_a() {
|
||
return this.var_com_ccnode_codegenerator_q_e_0_b;
|
||
}
|
||
|
||
public GenClassInfo com_ccnode_codegenerator_freemarker_dto_GenClassInfo_a() {
|
||
return this.var_com_ccnode_codegenerator_freemarker_dto_GenClassInfo_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiParameter
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.intellij.psi.PsiParameter;
|
||
|
||
public interface a {
|
||
public boolean a(PsiParameter var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.vfs.VirtualFileManager
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.xml.XmlFile
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.b;
|
||
import com.ccnode.codegenerator.G.d.b.a;
|
||
import com.ccnode.codegenerator.G.d.d.d;
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.j_0;
|
||
import com.ccnode.codegenerator.ad.l_0;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.ad.x_0;
|
||
import com.ccnode.codegenerator.freemarker.dto.GenClassInfo;
|
||
import com.ccnode.codegenerator.k.g;
|
||
import com.ccnode.codegenerator.l.a.j;
|
||
import com.ccnode.codegenerator.l.a.k;
|
||
import com.ccnode.codegenerator.l.c;
|
||
import com.ccnode.codegenerator.l.e;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.q.e_0;
|
||
import com.ccnode.codegenerator.x.i;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import java.util.ArrayList;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.function.BiConsumer;
|
||
import java.util.function.Predicate;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b
|
||
implements j {
|
||
private k a;
|
||
|
||
public b(k k2) {
|
||
this.a = k2;
|
||
}
|
||
|
||
@Override
|
||
public com.ccnode.codegenerator.G.a.e a(com.ccnode.codegenerator.G.a.a a2) {
|
||
switch (3.a[a2.com_ccnode_codegenerator_G_a_c_a().ordinal()]) {
|
||
case 1: {
|
||
return this.e(a2);
|
||
}
|
||
case 2: {
|
||
return this.d(a2);
|
||
}
|
||
case 3: {
|
||
return this.c(a2);
|
||
}
|
||
case 4: {
|
||
return this.b(a2);
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private com.ccnode.codegenerator.G.a.e b(com.ccnode.codegenerator.G.a.a a2) {
|
||
CharSequence charSequence;
|
||
com.ccnode.codegenerator.G.a.e e2 = new com.ccnode.codegenerator.G.a.e();
|
||
e2.a(a2.com_ccnode_codegenerator_G_d_b_a_a());
|
||
e2.a(new HashSet<String>());
|
||
a a3 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
Map<String, String> map = a2.a();
|
||
e_0 e_02 = a2.com_ccnode_codegenerator_q_e_0_a();
|
||
String string = a2.c();
|
||
e2.a(g.var_com_ccnode_codegenerator_k_g_a);
|
||
String string2 = map.get("id");
|
||
if (string2 != null && (string2.equals("java.lang.Integer") || string2.equals("java.lang.Long"))) {
|
||
e2.b(string2);
|
||
charSequence = t_0.var_com_ccnode_codegenerator_ad_t_0_a.c(string2);
|
||
e2.a().add(string2);
|
||
e2.a((String)charSequence);
|
||
} else {
|
||
e2.b("java.lang.Integer");
|
||
e2.a("Integer");
|
||
}
|
||
charSequence = new StringBuilder();
|
||
((StringBuilder)charSequence).append("\n" + n.a() + "select count(");
|
||
if (a3.b()) {
|
||
((StringBuilder)charSequence).append("distinct(");
|
||
for (var9_9 = 0; var9_9 < a3.b().size(); ++var9_9) {
|
||
((StringBuilder)charSequence).append(e_02.a(a3.b().get(var9_9), a2.f()));
|
||
if (var9_9 == a3.b().size() - 1) continue;
|
||
((StringBuilder)charSequence).append(",");
|
||
}
|
||
((StringBuilder)charSequence).append(")");
|
||
} else if (a3.b() == null) {
|
||
((StringBuilder)charSequence).append("1");
|
||
} else {
|
||
for (var9_9 = 0; var9_9 < a3.b().size(); ++var9_9) {
|
||
((StringBuilder)charSequence).append(e_02.a(a3.b().get(var9_9), a2.f()));
|
||
if (var9_9 == a3.b().size() - 1) continue;
|
||
((StringBuilder)charSequence).append(",");
|
||
}
|
||
}
|
||
((StringBuilder)charSequence).append(")");
|
||
((StringBuilder)charSequence).append("\n" + n.a() + "from " + string);
|
||
e2.a(new ArrayList<com.ccnode.codegenerator.G.a.b>());
|
||
e2.c(((StringBuilder)charSequence).toString());
|
||
String string3 = a2.f();
|
||
if (a3.a() != null) {
|
||
this.a(a3.a(), e2, map, e_02, string3);
|
||
}
|
||
e2.c(this.c(e2.c()));
|
||
return e2;
|
||
}
|
||
|
||
private com.ccnode.codegenerator.G.a.e c(com.ccnode.codegenerator.G.a.a a2) {
|
||
com.ccnode.codegenerator.G.a.e e2 = new com.ccnode.codegenerator.G.a.e();
|
||
e2.a(a2.com_ccnode_codegenerator_G_d_c_a_a());
|
||
e2.a(new HashSet<String>());
|
||
com.ccnode.codegenerator.G.d.c.a a3 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
String string = a2.c();
|
||
e_0 e_02 = a2.com_ccnode_codegenerator_q_e_0_a();
|
||
Map<String, String> map = a2.a();
|
||
e2.a(g.c);
|
||
e2.a("int");
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append("\n" + n.a() + "delete from " + string);
|
||
e2.a(new ArrayList<com.ccnode.codegenerator.G.a.b>());
|
||
e2.c(stringBuilder.toString());
|
||
String string2 = a2.f();
|
||
if (a3.a() != null) {
|
||
this.a(a3.a(), e2, map, e_02, string2);
|
||
}
|
||
e2.c(this.c(e2.c()));
|
||
if (a2.boolean_a()) {
|
||
String string3 = a2.g();
|
||
if (string3.equals("MybatisPlusWrapper")) {
|
||
String string4 = a2.d();
|
||
String string5 = com.ccnode.codegenerator.x.j.a.a(a2, e2);
|
||
e2.f(string5);
|
||
} else if (string3.equals("MybatisFlexWrapper")) {
|
||
String string6 = a2.d();
|
||
String string7 = i.a.a(a2, e2);
|
||
e2.f(string7);
|
||
}
|
||
}
|
||
return e2;
|
||
}
|
||
|
||
private com.ccnode.codegenerator.G.a.e d(com.ccnode.codegenerator.G.a.a a2) {
|
||
String string;
|
||
String string2;
|
||
Object object;
|
||
com.ccnode.codegenerator.G.a.e e2 = new com.ccnode.codegenerator.G.a.e();
|
||
e2.a(a2.com_ccnode_codegenerator_G_d_e_d_a());
|
||
e2.a(new HashSet<String>());
|
||
com.ccnode.codegenerator.G.d.e.d d2 = a2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
String string3 = a2.c();
|
||
Map<String, String> map = a2.a();
|
||
e_0 e_02 = a2.com_ccnode_codegenerator_q_e_0_a();
|
||
e2.a(g.b);
|
||
e2.a("int");
|
||
String string4 = a2.f();
|
||
e2.a(new ArrayList<com.ccnode.codegenerator.G.a.b>());
|
||
boolean bl = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getIfTestStringNullAndEmpty();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (d2.b()) {
|
||
stringBuilder.append("\n" + n.a() + "update " + string3 + "\n" + n.a() + "<set>\n");
|
||
a2.com_ccnode_codegenerator_q_e_0_a().b().forEach(new BiConsumer<String, String>(){
|
||
final /* synthetic */ Map var_java_util_Map_a;
|
||
final /* synthetic */ boolean var_boolean_a;
|
||
final /* synthetic */ StringBuilder var_java_lang_StringBuilder_a;
|
||
final /* synthetic */ e_0 var_com_ccnode_codegenerator_q_e_0_a;
|
||
final /* synthetic */ b var_com_ccnode_codegenerator_l_a_b_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_a_b_a = b2;
|
||
this.var_java_util_Map_a = map;
|
||
this.var_boolean_a = bl;
|
||
this.var_java_lang_StringBuilder_a = stringBuilder;
|
||
this.var_com_ccnode_codegenerator_q_e_0_a = e_02;
|
||
}
|
||
|
||
public void a(String string, String string2) {
|
||
String string3 = "updated." + string;
|
||
String string4 = (String)this.var_java_util_Map_a.get(string);
|
||
String string5 = this.var_com_ccnode_codegenerator_l_a_b_a.a(this.var_boolean_a, string3, string4);
|
||
this.var_java_lang_StringBuilder_a.append(n.a(3) + "<if test=\"" + string5 + "\">\n");
|
||
this.var_java_lang_StringBuilder_a.append(n.a(4) + string2 + " = #{" + string3 + this.var_com_ccnode_codegenerator_q_e_0_a.b(string) + "},\n");
|
||
this.var_java_lang_StringBuilder_a.append(n.a(3) + "</if>\n");
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (String)object2);
|
||
}
|
||
});
|
||
stringBuilder.append(n.a(2) + "</set>");
|
||
e2.a().add(com.ccnode.codegenerator.G.a.b.com_ccnode_codegenerator_G_a_b$a_a().a(a2.d()).d(a2.java_lang_String_a()).c("updated").b("updated").a());
|
||
e2.a().add(a2.java_lang_String_a());
|
||
} else {
|
||
stringBuilder.append("\n" + n.a() + "update " + string3 + "\n" + n.a() + "set");
|
||
}
|
||
Map<String, com.ccnode.codegenerator.G.d.e.c> map2 = this.a(d2.b(), a2.com_intellij_openapi_project_Project_a());
|
||
for (int i2 = 0; i2 < d2.b().size(); ++i2) {
|
||
object = d2.b().get(i2);
|
||
string2 = a2.com_ccnode_codegenerator_q_e_0_a().b(((com.ccnode.codegenerator.G.d.e.g)object).b());
|
||
string = ((com.ccnode.codegenerator.G.d.e.g)object).b();
|
||
if (((com.ccnode.codegenerator.G.d.e.g)object).a() == null) {
|
||
var15_16 = map.get(string);
|
||
e2.a().add((String)var15_16);
|
||
var16_17 = com.ccnode.codegenerator.G.a.b.com_ccnode_codegenerator_G_a_b$a_a().b("updated" + b.b(((com.ccnode.codegenerator.G.d.e.g)object).b())).a(t_0.var_com_ccnode_codegenerator_ad_t_0_a.c((String)var15_16)).d((String)var15_16).c("updated" + b.b(((com.ccnode.codegenerator.G.d.e.g)object).b())).a();
|
||
e2.a().add((com.ccnode.codegenerator.G.a.b)var16_17);
|
||
stringBuilder.append(" " + e_02.a(((com.ccnode.codegenerator.G.d.e.g)object).b(), string4) + "=#{" + ((com.ccnode.codegenerator.G.a.b)var16_17).b() + string2 + "}");
|
||
} else {
|
||
var15_16 = map2.get(((com.ccnode.codegenerator.G.d.e.g)object).b());
|
||
var16_17 = new com.ccnode.codegenerator.G.d.e.b();
|
||
if (((com.ccnode.codegenerator.G.d.e.g)object).a().equals("inc")) {
|
||
((com.ccnode.codegenerator.G.d.e.b)var16_17).a("added");
|
||
((com.ccnode.codegenerator.G.d.e.b)var16_17).b("+");
|
||
} else {
|
||
((com.ccnode.codegenerator.G.d.e.b)var16_17).a("deducted");
|
||
((com.ccnode.codegenerator.G.d.e.b)var16_17).b("-");
|
||
}
|
||
String string5 = e_02.a(((com.ccnode.codegenerator.G.d.e.g)object).b(), string4);
|
||
if (!((com.ccnode.codegenerator.G.d.e.c)var15_16).java_lang_Boolean_a().booleanValue()) {
|
||
stringBuilder.append(" " + string5 + " = " + string5 + ((com.ccnode.codegenerator.G.d.e.b)var16_17).b() + ((com.ccnode.codegenerator.G.d.e.c)var15_16).java_lang_String_a());
|
||
} else {
|
||
String string6 = map.get(string);
|
||
e2.a().add(string6);
|
||
com.ccnode.codegenerator.G.a.b b2 = com.ccnode.codegenerator.G.a.b.com_ccnode_codegenerator_G_a_b$a_a().b(((com.ccnode.codegenerator.G.d.e.b)var16_17).a() + b.b(((com.ccnode.codegenerator.G.d.e.g)object).b())).a(t_0.var_com_ccnode_codegenerator_ad_t_0_a.c(string6)).d(string6).c(((com.ccnode.codegenerator.G.d.e.b)var16_17).a() + b.b(((com.ccnode.codegenerator.G.d.e.g)object).b())).a();
|
||
e2.a().add(b2);
|
||
String string7 = e_02.a(((com.ccnode.codegenerator.G.d.e.g)object).b(), string4);
|
||
stringBuilder.append(" " + string7 + "=" + string7 + ((com.ccnode.codegenerator.G.d.e.b)var16_17).b() + "#{" + b2.b() + string2 + "}");
|
||
}
|
||
}
|
||
if (i2 == d2.b().size() - 1) continue;
|
||
stringBuilder.append(",");
|
||
}
|
||
e2.c(stringBuilder.toString());
|
||
String string8 = a2.f();
|
||
if (d2.a() != null) {
|
||
this.a(d2.a(), e2, map, e_02, string8);
|
||
}
|
||
e2.c(this.c(e2.c()));
|
||
if (a2.boolean_a()) {
|
||
object = a2.g();
|
||
if (((String)object).equals("MybatisPlusWrapper")) {
|
||
string2 = a2.d();
|
||
string = com.ccnode.codegenerator.x.j.a.b(a2, e2);
|
||
e2.f(string);
|
||
} else if (((String)object).equals("MybatisFlexWrapper")) {
|
||
string2 = a2.d();
|
||
string = i.a.b(a2, e2);
|
||
e2.f(string);
|
||
}
|
||
}
|
||
return e2;
|
||
}
|
||
|
||
private String a(boolean bl, String string, String string2) {
|
||
if (!bl) {
|
||
return string + " != null";
|
||
}
|
||
if (string2.equals("java.lang.String")) {
|
||
return string + " != null and " + string + " != ''";
|
||
}
|
||
return string + " != null";
|
||
}
|
||
|
||
private Map<String, com.ccnode.codegenerator.G.d.e.c> a(List<com.ccnode.codegenerator.G.d.e.g> list, Project project) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (com.ccnode.codegenerator.G.d.e.g g2 : list) {
|
||
if (g2.a() == null) continue;
|
||
arrayList.add(g2);
|
||
}
|
||
if (arrayList.size() == 0) {
|
||
return Maps.newHashMap();
|
||
}
|
||
Object object = new com.ccnode.codegenerator.G.d.e.a(arrayList, project);
|
||
boolean bl = object.showAndGet();
|
||
if (bl) {
|
||
return ((com.ccnode.codegenerator.G.d.e.a)((Object)object)).a();
|
||
}
|
||
com.ccnode.codegenerator.r.b b2 = new com.ccnode.codegenerator.r.b();
|
||
b2.a(false);
|
||
throw b2;
|
||
}
|
||
|
||
public static String java_lang_String_a(String string) {
|
||
return "<![CDATA[" + string + "]]>";
|
||
}
|
||
|
||
public static String b(String string) {
|
||
return string.substring(0, 1).toUpperCase() + string.substring(1);
|
||
}
|
||
|
||
public void a(List<com.ccnode.codegenerator.G.d.a.c> list, com.ccnode.codegenerator.G.a.e e2, Map<String, String> map, e_0 e_02, String string) {
|
||
boolean bl;
|
||
Profile profile = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
boolean bl2 = bl = !e2.com_ccnode_codegenerator_G_d_a_a_a().a().isEmpty() && profile.getUseWhereTagForIfTest();
|
||
if (!bl) {
|
||
e2.c(e2.c() + "\n" + n.a() + "where");
|
||
} else {
|
||
e2.c(e2.c() + "\n" + n.a() + "<where>");
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
com.ccnode.codegenerator.G.d.a.c c2 = list.get(i2);
|
||
String string2 = c2.a();
|
||
String string3 = c2.b();
|
||
String string4 = e_02.a(string2, string);
|
||
String string5 = e_02.b(string2);
|
||
String string6 = map.get(string2);
|
||
e2.a().add(string6);
|
||
String string7 = t_0.var_com_ccnode_codegenerator_ad_t_0_a.c(string6);
|
||
boolean bl3 = false;
|
||
com.ccnode.codegenerator.G.d.a.c c3 = null;
|
||
if (i2 == 0) {
|
||
bl3 = true;
|
||
} else {
|
||
c3 = list.get(i2 - 1);
|
||
}
|
||
j_0 j_02 = new j_0(c2, bl3, c3, e_02, map, e2.com_ccnode_codegenerator_G_d_a_a_a(), profile, bl, string);
|
||
l_0 l_02 = x_0.a.a(j_02);
|
||
List<com.ccnode.codegenerator.G.a.b> list2 = l_02.a();
|
||
e2.a().addAll(list2);
|
||
e2.c(e2.c() + l_02.a());
|
||
e2.a().addAll(l_02.b());
|
||
}
|
||
if (bl) {
|
||
e2.c(e2.c() + "\n" + n.a() + "</where>");
|
||
}
|
||
}
|
||
|
||
private boolean boolean_a(String string) {
|
||
if (string == null) {
|
||
return false;
|
||
}
|
||
return string.equals("in") || string.equals("notin");
|
||
}
|
||
|
||
private com.ccnode.codegenerator.G.a.e e(com.ccnode.codegenerator.G.a.a a2) {
|
||
Object object;
|
||
Object object2;
|
||
com.ccnode.codegenerator.G.a.e e2 = new com.ccnode.codegenerator.G.a.e();
|
||
e2.a(a2.com_ccnode_codegenerator_G_d_d_d_a());
|
||
e2.a(new HashSet<String>());
|
||
d d2 = a2.com_ccnode_codegenerator_G_d_d_d_a();
|
||
e_0 e_02 = a2.com_ccnode_codegenerator_q_e_0_a();
|
||
Map<String, String> map = a2.a();
|
||
e2.a(g.var_com_ccnode_codegenerator_k_g_a);
|
||
boolean bl = false;
|
||
if (d2.b() != null && d2.b().size() > 0) {
|
||
if (d2.b().size() > 1) {
|
||
if (!a2.boolean_a()) {
|
||
int n2 = Messages.showDialog((Project)a2.com_intellij_openapi_project_Project_a(), (String)"Fetch properties", (String)"Fetch properties", (String[])new String[]{"Use Existing resultMap", "Generate New Class"}, (int)0, null);
|
||
if (n2 == 0) {
|
||
e2.e(e_02.java_lang_String_a());
|
||
} else {
|
||
object2 = new e(a2.com_intellij_openapi_project_Project_a(), d2.b(), map, a2.b(), e_02, a2.com_intellij_psi_PsiClass_a());
|
||
boolean bl2 = object2.showAndGet();
|
||
if (!bl2) {
|
||
return null;
|
||
}
|
||
object = ((e)((Object)object2)).com_ccnode_codegenerator_freemarker_dto_GenClassInfo_a();
|
||
com.ccnode.codegenerator.u.a.a((GenClassInfo)object);
|
||
VirtualFileManager.getInstance().syncRefresh();
|
||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance((Project)a2.com_intellij_openapi_project_Project_a());
|
||
XmlFile xmlFile = a2.com_intellij_psi_xml_XmlFile_a();
|
||
d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(a2.com_intellij_openapi_project_Project_a(), psiDocumentManager.getDocument((PsiFile)xmlFile), xmlFile.getRootTag(), psiDocumentManager, ((e)((Object)object2)).com_ccnode_codegenerator_q_e_0_a(), ((e)((Object)object2)).java_lang_String_a());
|
||
e2.b(((e)((Object)object2)).java_lang_String_a());
|
||
e2.e(((e)((Object)object2)).com_ccnode_codegenerator_q_e_0_a().java_lang_String_a());
|
||
}
|
||
}
|
||
} else {
|
||
com.ccnode.codegenerator.G.d.d.a a3 = d2.b().get(0);
|
||
if (a3.a() == null) {
|
||
object2 = map.get(a3.b());
|
||
e2.b((String)object2);
|
||
} else {
|
||
object2 = a3.a();
|
||
String string = c.a(map, (String)object2, a3.b());
|
||
e2.b(string);
|
||
d2.c(false);
|
||
}
|
||
}
|
||
} else {
|
||
bl = true;
|
||
e2.e(e_02.java_lang_String_a());
|
||
}
|
||
Boolean bl3 = d2.c();
|
||
if (d2.a() != null) {
|
||
for (com.ccnode.codegenerator.G.d.a.c c2 : d2.a()) {
|
||
object = c2.a();
|
||
if (!"id".equals(((String)object).toLowerCase()) || c2.b() != null || e2.com_ccnode_codegenerator_G_d_a_a_a().a().contains("id")) continue;
|
||
bl3 = false;
|
||
}
|
||
}
|
||
if (e2.b() == null) {
|
||
e2.b(a2.java_lang_String_a());
|
||
}
|
||
if (bl3.booleanValue()) {
|
||
e2.a("List<" + t_0.var_com_ccnode_codegenerator_ad_t_0_a.c(e2.b()) + ">");
|
||
e2.a().add("java.util.List");
|
||
} else {
|
||
e2.a(t_0.var_com_ccnode_codegenerator_ad_t_0_a.c(e2.b()));
|
||
}
|
||
e2.a().add(e2.b());
|
||
e2.a(new ArrayList<com.ccnode.codegenerator.G.a.b>());
|
||
this.a.a(e2, a2, bl);
|
||
e2.c(e2.c() + "\n" + n.a() + "from " + a2.c());
|
||
this.a.a(e2, a2);
|
||
if (a2.boolean_a()) {
|
||
object2 = a2.g();
|
||
if (((String)object2).equals("MybatisPlusWrapper")) {
|
||
String string = a2.d();
|
||
object = com.ccnode.codegenerator.x.j.a.c(a2, e2);
|
||
e2.f((String)object);
|
||
} else if (((String)object2).equals("MybatisFlexWrapper")) {
|
||
String string = a2.d();
|
||
object = i.a.c(a2, e2);
|
||
e2.f((String)object);
|
||
}
|
||
}
|
||
if (d2.d().booleanValue()) {
|
||
object2 = e2.a();
|
||
object2.removeIf(new Predicate<com.ccnode.codegenerator.G.a.b>(){
|
||
final /* synthetic */ Map var_java_util_Map_a;
|
||
final /* synthetic */ b var_com_ccnode_codegenerator_l_a_b_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_a_b_a = b2;
|
||
this.var_java_util_Map_a = map;
|
||
}
|
||
|
||
public boolean a(com.ccnode.codegenerator.G.a.b b2) {
|
||
return this.var_java_util_Map_a.containsKey(b2.b());
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ boolean test(Object object) {
|
||
return this.a((com.ccnode.codegenerator.G.a.b)object);
|
||
}
|
||
});
|
||
String string = t_0.var_com_ccnode_codegenerator_ad_t_0_a.c(e2.b());
|
||
object = com.ccnode.codegenerator.G.a.b.com_ccnode_codegenerator_G_a_b$a_a().d(e2.b()).a(string).c(n.b(string));
|
||
if (d2.boolean_b()) {
|
||
e2.a().addAll(Lists.newArrayList((Object[])new com.ccnode.codegenerator.G.a.b[]{((b.a)object).b("query").a()}));
|
||
} else {
|
||
e2.a().addAll(Lists.newArrayList((Object[])new com.ccnode.codegenerator.G.a.b[]{((b.a)object).a()}));
|
||
}
|
||
}
|
||
e2.c(this.c(e2.c()));
|
||
return e2;
|
||
}
|
||
|
||
@NotNull
|
||
private String c(String string) {
|
||
if (string.endsWith("\n")) {
|
||
return string + n.a;
|
||
}
|
||
return string + "\n" + n.a;
|
||
}
|
||
|
||
private static boolean a(d d2) {
|
||
List<com.ccnode.codegenerator.G.d.d.a> list = d2.b();
|
||
if (list == null || list.size() == 0) {
|
||
return false;
|
||
}
|
||
for (com.ccnode.codegenerator.G.d.d.a a2 : list) {
|
||
if (a2.a() == null) continue;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.l.a.a;
|
||
import com.ccnode.codegenerator.l.a.e;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
|
||
public interface c {
|
||
public e com_ccnode_codegenerator_l_a_e_a();
|
||
|
||
public f com_ccnode_codegenerator_l_a_f_a();
|
||
|
||
public l com_ccnode_codegenerator_l_a_l_a();
|
||
|
||
public a com_ccnode_codegenerator_l_a_a_a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiField
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.intellij.psi.PsiField;
|
||
|
||
public interface d {
|
||
public boolean a(PsiField var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.l.a;
|
||
import com.ccnode.codegenerator.l.a.h;
|
||
import com.intellij.psi.PsiClass;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface e
|
||
extends h {
|
||
@NotNull
|
||
public String a(com.ccnode.codegenerator.u.a.a var1);
|
||
|
||
@NotNull
|
||
public a a(PsiClass var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
|
||
public interface f {
|
||
public e a(a var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiType
|
||
* com.intellij.psi.util.PsiTypesUtil
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.l.a;
|
||
import com.ccnode.codegenerator.l.a.d;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiType;
|
||
import com.intellij.psi.util.PsiTypesUtil;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
import java.util.stream.Collectors;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class g {
|
||
private d a;
|
||
|
||
public g(d d2) {
|
||
this.a = d2;
|
||
}
|
||
|
||
public a a(PsiClass psiClass) {
|
||
return this.a(psiClass, 1);
|
||
}
|
||
|
||
@NotNull
|
||
private a a(PsiClass psiClass, int n2) {
|
||
a a2 = new a();
|
||
PsiField[] psiFieldArray = psiClass.getAllFields();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
ArrayList arrayList2 = Lists.newArrayList();
|
||
a2.a(arrayList);
|
||
if (psiFieldArray.length == 0) {
|
||
a2.a(false);
|
||
a2.a("there is no available field in current class");
|
||
return a2;
|
||
}
|
||
PsiField[] psiFieldArray2 = psiClass.getFields();
|
||
List<PsiField> list = g.a(psiClass);
|
||
ArrayList arrayList3 = Lists.newArrayList();
|
||
arrayList3.addAll(list);
|
||
arrayList3.addAll(Arrays.stream(psiFieldArray2).collect(Collectors.toList()));
|
||
for (Object object : arrayList3) {
|
||
if (object.hasModifierProperty("static")) continue;
|
||
if (!t_0.var_com_ccnode_codegenerator_ad_t_0_a.a((PsiField)object)) {
|
||
arrayList2.add(g.a((PsiField)object, "ignore transient type"));
|
||
continue;
|
||
}
|
||
if (!t_0.var_com_ccnode_codegenerator_ad_t_0_a.a((PsiField)object)) continue;
|
||
String string = object.getType().getCanonicalText();
|
||
if (!this.a.a((PsiField)object)) {
|
||
PsiType psiType;
|
||
PsiClass psiClass2;
|
||
if (t_0.var_com_ccnode_codegenerator_ad_t_0_a.boolean_a(string)) {
|
||
arrayList2.add(g.a((PsiField)object, " please use with object type"));
|
||
continue;
|
||
}
|
||
if (n2 == 2) {
|
||
arrayList2.add(g.a((PsiField)object, " current only support two level check"));
|
||
}
|
||
if ((psiClass2 = PsiTypesUtil.getPsiClass((PsiType)(psiType = object.getType()))) != null && n2 == 1) {
|
||
int n3 = Messages.showOkCancelDialog((Project)psiClass.getProject(), (String)(object.getName() + " " + psiType.getCanonicalText() + " is not supported, do you want to extract fields from it?"), (String)"Type is not supported", null);
|
||
if (n3 == 0) {
|
||
a a3 = this.a(psiClass2, n2 + 1);
|
||
List<PsiField> list2 = a3.a();
|
||
arrayList.addAll(list2);
|
||
String string2 = a3.java_lang_String_a();
|
||
if (string2 == null) continue;
|
||
arrayList2.add(string2);
|
||
continue;
|
||
}
|
||
arrayList2.add(g.a((PsiField)object, " unsupported field type"));
|
||
continue;
|
||
}
|
||
arrayList2.add(g.a((PsiField)object, " unsupported field type"));
|
||
continue;
|
||
}
|
||
arrayList.add(object);
|
||
}
|
||
if (arrayList2.size() > 0) {
|
||
a2.a(false);
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (String string : arrayList2) {
|
||
stringBuilder.append(string + "\n");
|
||
}
|
||
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
||
a2.a(stringBuilder.toString());
|
||
return a2;
|
||
}
|
||
a2.a(true);
|
||
return a2;
|
||
}
|
||
|
||
private static List<PsiField> a(PsiClass psiClass) {
|
||
return Arrays.stream(psiClass.getAllFields()).filter(psiField -> {
|
||
for (PsiField psiField2 : psiClass.getFields()) {
|
||
if (psiField2.getName() == null || !psiField2.getName().equals(psiField.getName())) continue;
|
||
return false;
|
||
}
|
||
return true;
|
||
}).collect(Collectors.toList());
|
||
}
|
||
|
||
private static String a(PsiField psiField, String string) {
|
||
return "field name is:" + psiField.getName() + " field type is:" + psiField.getType().getCanonicalText() + " invalid reason is:" + string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
public class i {
|
||
public static final String a = "CHAR";
|
||
public static final String b = "VARCHAR";
|
||
public static final String c = "LONGVARCHAR";
|
||
public static final String d = "BIT";
|
||
public static final String e = "TINYINT";
|
||
public static final String f = "SMALLINT";
|
||
public static final String g = "INTEGER";
|
||
public static final String h = "BIGINT";
|
||
public static final String i = "REAL";
|
||
public static final String j = "DOUBLE";
|
||
public static final String k = "FLOAT";
|
||
public static final String l = "DECIMAL";
|
||
public static final String m = "NUMERIC";
|
||
public static final String n = "DATE";
|
||
public static final String o = "TIME";
|
||
public static final String p = "TIMESTAMP";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiField
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.n.a.b;
|
||
import com.intellij.psi.PsiField;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface h {
|
||
@NotNull
|
||
public List<b> a(PsiField var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.a;
|
||
|
||
import com.ccnode.codegenerator.l.a.a.a;
|
||
import com.ccnode.codegenerator.l.a.a.d;
|
||
import com.ccnode.codegenerator.l.a.a.e;
|
||
import com.ccnode.codegenerator.l.a.a.i;
|
||
import com.ccnode.codegenerator.l.a.c;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
|
||
public class b
|
||
implements c {
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.e com_ccnode_codegenerator_l_a_e_a() {
|
||
return d.var_com_ccnode_codegenerator_l_a_a_d_a;
|
||
}
|
||
|
||
@Override
|
||
public f com_ccnode_codegenerator_l_a_f_a() {
|
||
return e.var_com_ccnode_codegenerator_l_a_a_e_a;
|
||
}
|
||
|
||
@Override
|
||
public l com_ccnode_codegenerator_l_a_l_a() {
|
||
return i.a;
|
||
}
|
||
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.a com_ccnode_codegenerator_l_a_a_a() {
|
||
return a.a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.a;
|
||
|
||
public class j {
|
||
private boolean var_boolean_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiParameter
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.b;
|
||
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.l.a.b.f;
|
||
import com.intellij.psi.PsiParameter;
|
||
|
||
public class a
|
||
implements com.ccnode.codegenerator.l.a.a {
|
||
private static volatile a a;
|
||
|
||
private a() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static a a() {
|
||
if (a != null) return a;
|
||
Class<a> clazz = a.class;
|
||
synchronized (a.class) {
|
||
if (a != null) return a;
|
||
a = new a();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return a;
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public boolean a(PsiParameter psiParameter) {
|
||
return f.var_com_ccnode_codegenerator_l_a_b_f_a.a(t_0.var_com_ccnode_codegenerator_ad_t_0_a.java_lang_String_a(psiParameter.getType().getCanonicalText())) != null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.b;
|
||
|
||
import com.ccnode.codegenerator.l.a.b.a;
|
||
import com.ccnode.codegenerator.l.a.b.d;
|
||
import com.ccnode.codegenerator.l.a.b.e;
|
||
import com.ccnode.codegenerator.l.a.b.i;
|
||
import com.ccnode.codegenerator.l.a.c;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
|
||
public class b
|
||
implements c {
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.e com_ccnode_codegenerator_l_a_e_a() {
|
||
return d.var_com_ccnode_codegenerator_l_a_b_d_a;
|
||
}
|
||
|
||
@Override
|
||
public f com_ccnode_codegenerator_l_a_f_a() {
|
||
return e.a();
|
||
}
|
||
|
||
@Override
|
||
public l com_ccnode_codegenerator_l_a_l_a() {
|
||
return i.a();
|
||
}
|
||
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.a com_ccnode_codegenerator_l_a_a_a() {
|
||
return a.a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.b;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.l.a.b;
|
||
import com.ccnode.codegenerator.l.a.b.g;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
|
||
public class e
|
||
implements f {
|
||
private static volatile e var_com_ccnode_codegenerator_l_a_b_e_a;
|
||
private static volatile b var_com_ccnode_codegenerator_l_a_b_a;
|
||
|
||
private e() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static e a() {
|
||
if (var_com_ccnode_codegenerator_l_a_b_e_a != null) return var_com_ccnode_codegenerator_l_a_b_e_a;
|
||
Class<e> clazz = e.class;
|
||
synchronized (e.class) {
|
||
if (var_com_ccnode_codegenerator_l_a_b_e_a != null) return var_com_ccnode_codegenerator_l_a_b_e_a;
|
||
var_com_ccnode_codegenerator_l_a_b_e_a = new e();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return var_com_ccnode_codegenerator_l_a_b_e_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
@Override
|
||
public com.ccnode.codegenerator.G.a.e a(a a2) {
|
||
if (var_com_ccnode_codegenerator_l_a_b_a != null) return var_com_ccnode_codegenerator_l_a_b_a.a(a2);
|
||
Class<e> clazz = e.class;
|
||
synchronized (e.class) {
|
||
var_com_ccnode_codegenerator_l_a_b_a = new b(new g());
|
||
// ** MonitorExit[var2_2] (shouldn't be in output)
|
||
return var_com_ccnode_codegenerator_l_a_b_a.a(a2);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.b;
|
||
|
||
public class h {
|
||
public static final String a = "NUMBER";
|
||
public static final String b = "VARCHAR2";
|
||
public static final String c = "NVARCHAR2";
|
||
public static final String d = "DATE";
|
||
public static final String e = "BLOB";
|
||
public static final String f = "TIMESTAMP";
|
||
public static final String g = "boolean";
|
||
public static final String h = "CLOB";
|
||
public static final String i = "RAW";
|
||
public static final String j = "CHAR";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiField
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.b;
|
||
|
||
import com.ccnode.codegenerator.l.a.b.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
import com.ccnode.codegenerator.n.b.a.b;
|
||
import com.ccnode.codegenerator.n.h;
|
||
import com.intellij.psi.PsiField;
|
||
import java.util.List;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class i
|
||
implements l {
|
||
private static volatile i a;
|
||
|
||
private i() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static i a() {
|
||
if (a != null) return a;
|
||
Class<i> clazz = i.class;
|
||
synchronized (i.class) {
|
||
if (a != null) return a;
|
||
a = new i();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return a;
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public String a(List<h> list, String string, List<b> list2) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (h h2 : list) {
|
||
stringBuilder.append("alter table ").append(string).append(" add " + h2.java_lang_String_d()).append(" ").append(h2.f());
|
||
if (StringUtils.isNotBlank((String)h2.java_lang_String_e())) {
|
||
stringBuilder.append("(" + h2.java_lang_String_e() + ")");
|
||
}
|
||
if (h2.java_lang_Boolean_b().booleanValue() && StringUtils.isNotBlank((String)h2.g())) {
|
||
stringBuilder.append(" DEFAULT " + h2.g());
|
||
}
|
||
if (!h2.java_lang_Boolean_c().booleanValue()) {
|
||
stringBuilder.append(" NOT NULL");
|
||
}
|
||
stringBuilder.append(";\n");
|
||
}
|
||
for (h h2 : list) {
|
||
if (!StringUtils.isNotBlank((String)h2.java_lang_String_b())) continue;
|
||
stringBuilder.append("comment on COLUMN " + string + "." + h2.java_lang_String_d() + " IS '" + h2.java_lang_String_b() + "';\n");
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public List<com.ccnode.codegenerator.n.a.b> a(PsiField psiField) {
|
||
return f.var_com_ccnode_codegenerator_l_a_b_f_a.a(psiField);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
|
||
public interface j {
|
||
public e a(a var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
|
||
public interface k {
|
||
public void a(e var1, a var2, boolean var3);
|
||
|
||
public void a(e var1, a var2);
|
||
|
||
public void b(e var1, a var2);
|
||
|
||
public void c(e var1, a var2);
|
||
|
||
public void d(e var1, a var2);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiParameter
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.d;
|
||
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.l.a.d.f;
|
||
import com.intellij.psi.PsiParameter;
|
||
|
||
public class a
|
||
implements com.ccnode.codegenerator.l.a.a {
|
||
private static volatile a a;
|
||
|
||
private a() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static a a() {
|
||
if (a != null) return a;
|
||
Class<a> clazz = a.class;
|
||
synchronized (a.class) {
|
||
if (a != null) return a;
|
||
a = new a();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return a;
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public boolean a(PsiParameter psiParameter) {
|
||
return f.var_com_ccnode_codegenerator_l_a_d_f_a.a(t_0.var_com_ccnode_codegenerator_ad_t_0_a.java_lang_String_a(psiParameter.getType().getCanonicalText())) != null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.d;
|
||
|
||
import com.ccnode.codegenerator.l.a.c;
|
||
import com.ccnode.codegenerator.l.a.d.a;
|
||
import com.ccnode.codegenerator.l.a.d.d;
|
||
import com.ccnode.codegenerator.l.a.d.e;
|
||
import com.ccnode.codegenerator.l.a.d.i;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
|
||
public class b
|
||
implements c {
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.e com_ccnode_codegenerator_l_a_e_a() {
|
||
return d.var_com_ccnode_codegenerator_l_a_d_d_a;
|
||
}
|
||
|
||
@Override
|
||
public f com_ccnode_codegenerator_l_a_f_a() {
|
||
return e.a();
|
||
}
|
||
|
||
@Override
|
||
public l com_ccnode_codegenerator_l_a_l_a() {
|
||
return i.a();
|
||
}
|
||
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.a com_ccnode_codegenerator_l_a_a_a() {
|
||
return a.a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.d;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.l.a.b;
|
||
import com.ccnode.codegenerator.l.a.d.g;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
|
||
public class e
|
||
implements f {
|
||
private static volatile e var_com_ccnode_codegenerator_l_a_d_e_a;
|
||
private static volatile b var_com_ccnode_codegenerator_l_a_b_a;
|
||
|
||
private e() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static e a() {
|
||
if (var_com_ccnode_codegenerator_l_a_d_e_a != null) return var_com_ccnode_codegenerator_l_a_d_e_a;
|
||
Class<e> clazz = e.class;
|
||
synchronized (e.class) {
|
||
if (var_com_ccnode_codegenerator_l_a_d_e_a != null) return var_com_ccnode_codegenerator_l_a_d_e_a;
|
||
var_com_ccnode_codegenerator_l_a_d_e_a = new e();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return var_com_ccnode_codegenerator_l_a_d_e_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
@Override
|
||
public com.ccnode.codegenerator.G.a.e a(a a2) {
|
||
if (var_com_ccnode_codegenerator_l_a_b_a != null) return var_com_ccnode_codegenerator_l_a_b_a.a(a2);
|
||
Class<e> clazz = e.class;
|
||
synchronized (e.class) {
|
||
var_com_ccnode_codegenerator_l_a_b_a = new b(new g());
|
||
// ** MonitorExit[var2_2] (shouldn't be in output)
|
||
return var_com_ccnode_codegenerator_l_a_b_a.a(a2);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.d;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
import com.ccnode.codegenerator.G.d.d.c;
|
||
import com.ccnode.codegenerator.G.d.d.d;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.l.a.b;
|
||
import com.ccnode.codegenerator.l.a.k;
|
||
import com.ccnode.codegenerator.q.e_0;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class g
|
||
implements k {
|
||
@Override
|
||
public void a(e e2, a a2, boolean bl) {
|
||
d d2 = a2.com_ccnode_codegenerator_G_d_d_d_a();
|
||
e_0 e_02 = a2.com_ccnode_codegenerator_q_e_0_a();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (bl) {
|
||
stringBuilder.append("\n" + n.a() + "select <include refid=\"" + a2.e() + "\"/>");
|
||
} else {
|
||
stringBuilder.append("\n" + n.a() + "select");
|
||
if (d2.java_lang_Boolean_b().booleanValue()) {
|
||
stringBuilder.append(" distinct(");
|
||
for (com.ccnode.codegenerator.G.d.d.a a3 : d2.b()) {
|
||
stringBuilder.append(e_02.a(a3.b(), "Sqlite") + ",");
|
||
}
|
||
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
||
stringBuilder.append(")");
|
||
} else {
|
||
for (com.ccnode.codegenerator.G.d.d.a a4 : d2.b()) {
|
||
if (a4.a() != null) continue;
|
||
stringBuilder.append(" " + e_02.a(a4.b(), "Sqlite") + ",");
|
||
}
|
||
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
||
}
|
||
}
|
||
e2.c(stringBuilder.toString());
|
||
}
|
||
|
||
@Override
|
||
public void a(e e2, a a2) {
|
||
d d2 = a2.com_ccnode_codegenerator_G_d_d_d_a();
|
||
if (d2.a() != null) {
|
||
e2.a(new ArrayList<com.ccnode.codegenerator.G.a.b>());
|
||
new b(this).a(d2.a(), e2, a2.a(), a2.com_ccnode_codegenerator_q_e_0_a(), "Sqlite");
|
||
}
|
||
if (d2.c() != null) {
|
||
e2.c(e2.c() + " order by");
|
||
List<c> list = d2.c();
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
c c2 = list.get(i2);
|
||
e2.c(e2.c() + " " + a2.com_ccnode_codegenerator_q_e_0_a().a(c2.a(), "Sqlite") + " " + c2.b());
|
||
if (i2 == list.size() - 1) continue;
|
||
e2.c(e2.c() + ",");
|
||
}
|
||
}
|
||
if (d2.java_lang_Integer_a() > 0) {
|
||
if (d2.a() != null && d2.a().size() > 0) {
|
||
e2.c(e2.c() + " and ROWNUM " + b.java_lang_String_a("<=") + d2.java_lang_Integer_a());
|
||
} else {
|
||
e2.c(e2.c() + " ROWNUM " + b.java_lang_String_a("<=") + d2.java_lang_Integer_a());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public void b(e e2, a a2) {
|
||
}
|
||
|
||
@Override
|
||
public void c(e e2, a a2) {
|
||
}
|
||
|
||
@Override
|
||
public void d(e e2, a a2) {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.d;
|
||
|
||
public class h {
|
||
public static final String a = "INTEGER";
|
||
public static final String b = "TEXT";
|
||
public static final String c = "BLOB";
|
||
public static final String d = "REAL";
|
||
public static final String e = "NUMERIC";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiField
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.d;
|
||
|
||
import com.ccnode.codegenerator.l.a.d.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
import com.ccnode.codegenerator.n.b.a.b;
|
||
import com.ccnode.codegenerator.n.h;
|
||
import com.intellij.psi.PsiField;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class i
|
||
implements l {
|
||
private static volatile i a;
|
||
|
||
private i() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static i a() {
|
||
if (a != null) return a;
|
||
Class<i> clazz = i.class;
|
||
synchronized (i.class) {
|
||
if (a != null) return a;
|
||
a = new i();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return a;
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public String a(List<h> list, String string, List<b> list2) {
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
@NotNull
|
||
public List<com.ccnode.codegenerator.n.a.b> a(PsiField psiField) {
|
||
return f.var_com_ccnode_codegenerator_l_a_d_f_a.a(psiField);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a.e;
|
||
|
||
import com.ccnode.codegenerator.l.a.c;
|
||
import com.ccnode.codegenerator.l.a.e.a;
|
||
import com.ccnode.codegenerator.l.a.e.d;
|
||
import com.ccnode.codegenerator.l.a.e.e;
|
||
import com.ccnode.codegenerator.l.a.e.i;
|
||
import com.ccnode.codegenerator.l.a.f;
|
||
import com.ccnode.codegenerator.l.a.l;
|
||
|
||
public class b
|
||
implements c {
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.e com_ccnode_codegenerator_l_a_e_a() {
|
||
return d.var_com_ccnode_codegenerator_l_a_e_d_a;
|
||
}
|
||
|
||
@Override
|
||
public f com_ccnode_codegenerator_l_a_f_a() {
|
||
return e.var_com_ccnode_codegenerator_l_a_e_e_a;
|
||
}
|
||
|
||
@Override
|
||
public l com_ccnode_codegenerator_l_a_l_a() {
|
||
return i.a;
|
||
}
|
||
|
||
@Override
|
||
public com.ccnode.codegenerator.l.a.a com_ccnode_codegenerator_l_a_a_a() {
|
||
return a.a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l.a;
|
||
|
||
import com.ccnode.codegenerator.l.a.h;
|
||
import com.ccnode.codegenerator.n.b.a.b;
|
||
import java.util.List;
|
||
|
||
public interface l
|
||
extends h {
|
||
public String a(List<com.ccnode.codegenerator.n.h> var1, String var2, List<b> var3);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import java.util.HashSet;
|
||
import java.util.Set;
|
||
|
||
public class f {
|
||
public static Set<String> var_java_util_Set_java_lang_String__a;
|
||
public static final String var_java_lang_String_a = "java.lang.Integer";
|
||
public static final String b = "java.lang.Long";
|
||
public static final String c = "java.lang.Float";
|
||
public static final String d = "java.lang.Double";
|
||
public static final String e = "java.lang.Boolean";
|
||
public static final String f = "java.util.Date";
|
||
public static final String g = "java.lang.String";
|
||
public static final String h = "java.lang.Byte";
|
||
public static final String i = "java.lang.Byte[]";
|
||
public static final String j = "java.math.BigDecimal";
|
||
public static final String k = "java.lang.Short";
|
||
public static final String l = "java.sql.Timestamp";
|
||
public static final String m = "java.sql.Date";
|
||
public static final String n = "java.sql.Time";
|
||
public static final String o = "java.time.LocalDateTime";
|
||
public static final String p = "java.time.LocalDate";
|
||
public static final String q = "java.time.LocalTime";
|
||
public static final String r = "java.time.OffsetDateTime";
|
||
public static final String s = "java.time.OffsetTime";
|
||
public static final String t = "java.time.ZonedDateTime";
|
||
public static final String u = "java.sql.Clob";
|
||
public static final String v = "java.time.Instant";
|
||
|
||
static {
|
||
var_java_util_Set_java_lang_String__a = new HashSet<String>(){
|
||
{
|
||
this.add(com.ccnode.codegenerator.l.f.var_java_lang_String_a);
|
||
this.add(com.ccnode.codegenerator.l.f.b);
|
||
this.add(com.ccnode.codegenerator.l.f.c);
|
||
this.add(com.ccnode.codegenerator.l.f.d);
|
||
this.add(com.ccnode.codegenerator.l.f.e);
|
||
this.add(com.ccnode.codegenerator.l.f.f);
|
||
this.add(com.ccnode.codegenerator.l.f.g);
|
||
this.add(com.ccnode.codegenerator.l.f.h);
|
||
this.add(com.ccnode.codegenerator.l.f.i);
|
||
this.add(com.ccnode.codegenerator.l.f.j);
|
||
this.add(com.ccnode.codegenerator.l.f.k);
|
||
this.add(com.ccnode.codegenerator.l.f.l);
|
||
this.add(com.ccnode.codegenerator.l.f.m);
|
||
this.add(com.ccnode.codegenerator.l.f.n);
|
||
this.add(com.ccnode.codegenerator.l.f.o);
|
||
this.add(com.ccnode.codegenerator.l.f.p);
|
||
this.add(com.ccnode.codegenerator.l.f.q);
|
||
this.add(com.ccnode.codegenerator.l.f.r);
|
||
this.add(com.ccnode.codegenerator.l.f.s);
|
||
this.add(com.ccnode.codegenerator.l.f.t);
|
||
this.add(com.ccnode.codegenerator.l.f.u);
|
||
this.add(com.ccnode.codegenerator.l.f.v);
|
||
}
|
||
};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.l.b;
|
||
|
||
import com.ccnode.codegenerator.ad.h;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
public interface a {
|
||
public Map<String, List<h>> a(List<String> var1, Project var2, Profile var3);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.l.b;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.TestConfiguration;
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.List;
|
||
|
||
public interface b {
|
||
public static final ExtensionPointName<b> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.databaseConfigProvider");
|
||
|
||
public List<TestConfiguration> a(Project var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.database.model.DasColumn
|
||
* com.intellij.database.model.DasDataSource
|
||
* com.intellij.database.model.DasObject
|
||
* com.intellij.database.model.DasTable
|
||
* com.intellij.database.psi.DbDataSource
|
||
* com.intellij.database.psi.DbPsiFacade
|
||
* com.intellij.database.util.DasUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.util.containers.JBIterable
|
||
*/
|
||
package com.ccnode.codegenerator.l.b;
|
||
|
||
import com.ccnode.codegenerator.ad.h;
|
||
import com.ccnode.codegenerator.ag.d.j;
|
||
import com.ccnode.codegenerator.l.b.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.database.model.DasColumn;
|
||
import com.intellij.database.model.DasDataSource;
|
||
import com.intellij.database.model.DasObject;
|
||
import com.intellij.database.model.DasTable;
|
||
import com.intellij.database.psi.DbDataSource;
|
||
import com.intellij.database.psi.DbPsiFacade;
|
||
import com.intellij.database.util.DasUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.util.containers.JBIterable;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
public class c
|
||
implements a {
|
||
@Override
|
||
public Map<String, List<h>> a(List<String> list, Project project, Profile profile) {
|
||
HashMap hashMap = Maps.newHashMap();
|
||
List list2 = DbPsiFacade.getInstance((Project)project).getDataSources();
|
||
if (list2.isEmpty()) {
|
||
return hashMap;
|
||
}
|
||
HashSet hashSet = Sets.newHashSet();
|
||
for (String object : list) {
|
||
hashSet.add(object.toLowerCase());
|
||
}
|
||
u u2 = new u();
|
||
for (DbDataSource dbDataSource : list2) {
|
||
JBIterable jBIterable = DasUtil.getTables((DasDataSource)dbDataSource);
|
||
String string = dbDataSource.getConnectionConfig().getUrl();
|
||
String string2 = j.a(string);
|
||
for (DasTable dasTable : jBIterable) {
|
||
String string3 = dasTable.getName();
|
||
if (!hashSet.contains(string3.toLowerCase())) continue;
|
||
hashSet.remove(string3.toLowerCase());
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
JBIterable jBIterable2 = DasUtil.getColumns((DasObject)dasTable);
|
||
for (DasColumn dasColumn : jBIterable2) {
|
||
h h2 = new h();
|
||
h2.a(dasColumn.getName().toLowerCase());
|
||
String string4 = u2.a(com.ccnode.codegenerator.ae.a.a(dasColumn.getDasType().toDataType().typeName, dasColumn.getDasType().toDataType().size, string2), dasColumn.getDasType().toDataType().getScale(), dasColumn.getDasType().toDataType().size, profile.getUsejava8LocalDateTimeEct());
|
||
h2.b(string4);
|
||
arrayList.add(h2);
|
||
}
|
||
hashMap.put(string3.toLowerCase(), arrayList);
|
||
}
|
||
if (hashSet.size() != 0) continue;
|
||
break;
|
||
}
|
||
return hashMap;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.database.psi.DbDataSource
|
||
* com.intellij.database.psi.DbPsiFacade
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.lang.StringUtils
|
||
*/
|
||
package com.ccnode.codegenerator.l.b;
|
||
|
||
import com.ccnode.codegenerator.ag.d.j;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.l.b.b;
|
||
import com.ccnode.codegenerator.myconfigurable.IntellijDatabaseUserNameAndPassword;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.TestConfiguration;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.database.psi.DbDataSource;
|
||
import com.intellij.database.psi.DbPsiFacade;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import org.apache.commons.lang.StringUtils;
|
||
|
||
public class d
|
||
implements b {
|
||
@Override
|
||
public List<TestConfiguration> a(Project project) {
|
||
List list = DbPsiFacade.getInstance((Project)project).getDataSources();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (DbDataSource dbDataSource : list) {
|
||
if (!StringUtils.isNotBlank((String)dbDataSource.getName())) continue;
|
||
arrayList.add(this.a(dbDataSource, project));
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
private TestConfiguration a(DbDataSource dbDataSource, Project project) {
|
||
String string = dbDataSource.getConnectionConfig().getUrl();
|
||
String string2 = dbDataSource.getConnectionConfig().getDriverClass();
|
||
NewDatabaseInfo newDatabaseInfo = new NewDatabaseInfo();
|
||
newDatabaseInfo.setUrl(string);
|
||
newDatabaseInfo.setDatabase(dbDataSource.getName());
|
||
newDatabaseInfo.setDatabaseType(j.a(dbDataSource.getConnectionConfig().getUrl()));
|
||
Map<String, IntellijDatabaseUserNameAndPassword> map = e.com_ccnode_codegenerator_ag_e_e_a(project).a().getIntellijDatabaseUserNameAndPasswordMap();
|
||
IntellijDatabaseUserNameAndPassword intellijDatabaseUserNameAndPassword = map.get(string);
|
||
if (intellijDatabaseUserNameAndPassword != null) {
|
||
newDatabaseInfo.setPassword(intellijDatabaseUserNameAndPassword.getPassword());
|
||
newDatabaseInfo.setUserName(intellijDatabaseUserNameAndPassword.getUserName());
|
||
} else {
|
||
newDatabaseInfo.setUserName("");
|
||
newDatabaseInfo.setPassword("");
|
||
}
|
||
return new TestConfiguration(string, newDatabaseInfo.getUserName(), newDatabaseInfo.getPassword(), true, string2, "intellijDatabase", 2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.dci.intellij.dbn.browser.model.BrowserTreeNode
|
||
* com.dci.intellij.dbn.common.action.DataKeys
|
||
* com.dci.intellij.dbn.object.DBDataset
|
||
* com.dci.intellij.dbn.object.DBSchema
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a.b.a;
|
||
import com.dci.intellij.dbn.browser.model.BrowserTreeNode;
|
||
import com.dci.intellij.dbn.common.action.DataKeys;
|
||
import com.dci.intellij.dbn.object.DBDataset;
|
||
import com.dci.intellij.dbn.object.DBSchema;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import java.util.ArrayList;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b
|
||
extends com.ccnode.codegenerator.a.a {
|
||
public b() {
|
||
super(p.a());
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
BrowserTreeNode browserTreeNode = (BrowserTreeNode)anActionEvent.getData(DataKeys.BROWSER_TREE_NODE_DATA_KEY);
|
||
if (!(browserTreeNode instanceof DBDataset)) {
|
||
return;
|
||
}
|
||
DBDataset dBDataset = (DBDataset)browserTreeNode;
|
||
boolean bl = com.ccnode.codegenerator.ah.a.a.a(anActionEvent.getProject());
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
arrayList.add(dBDataset.getName());
|
||
DBSchema dBSchema = dBDataset.getSchema();
|
||
a a2 = new a(dBSchema, dBSchema.getName());
|
||
com.ccnode.codegenerator.mybatisGenerator.c.b b2 = new com.ccnode.codegenerator.mybatisGenerator.c.b(anActionEvent.getProject(), a2, arrayList);
|
||
b2.showAndGet();
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
BrowserTreeNode browserTreeNode = (BrowserTreeNode)anActionEvent.getData(DataKeys.BROWSER_TREE_NODE_DATA_KEY);
|
||
if (browserTreeNode != null && browserTreeNode instanceof DBDataset) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(true);
|
||
return;
|
||
}
|
||
anActionEvent.getPresentation().setEnabledAndVisible(false);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.dci.intellij.dbn.browser.model.BrowserTreeNode
|
||
* com.dci.intellij.dbn.common.action.DataKeys
|
||
* com.dci.intellij.dbn.object.DBDataset
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a.b.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.s;
|
||
import com.dci.intellij.dbn.browser.model.BrowserTreeNode;
|
||
import com.dci.intellij.dbn.common.action.DataKeys;
|
||
import com.dci.intellij.dbn.object.DBDataset;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
|
||
public class c
|
||
extends com.ccnode.codegenerator.a.a {
|
||
public c() {
|
||
super(p.a());
|
||
}
|
||
|
||
public void actionPerformed(AnActionEvent anActionEvent) {
|
||
BrowserTreeNode browserTreeNode = (BrowserTreeNode)anActionEvent.getData(DataKeys.BROWSER_TREE_NODE_DATA_KEY);
|
||
if (!(browserTreeNode instanceof DBDataset)) {
|
||
return;
|
||
}
|
||
DBDataset dBDataset = (DBDataset)browserTreeNode;
|
||
boolean bl = com.ccnode.codegenerator.ah.a.a.a(anActionEvent.getProject());
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
s s2 = new s(dBDataset.getName(), anActionEvent.getProject(), new a(dBDataset));
|
||
boolean bl2 = s2.showAndGet();
|
||
}
|
||
|
||
public void update(AnActionEvent anActionEvent) {
|
||
BrowserTreeNode browserTreeNode = (BrowserTreeNode)anActionEvent.getData(DataKeys.BROWSER_TREE_NODE_DATA_KEY);
|
||
if (browserTreeNode != null && browserTreeNode instanceof DBDataset) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(true);
|
||
return;
|
||
}
|
||
anActionEvent.getPresentation().setEnabledAndVisible(false);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.dci.intellij.dbn.connection.DatabaseType
|
||
* com.dci.intellij.dbn.object.DBColumn
|
||
* com.dci.intellij.dbn.object.DBDataset
|
||
* com.dci.intellij.dbn.object.DBTable
|
||
* com.google.common.collect.Lists
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
* org.mybatis.generator.api.intellij.IntellijColumnInfo
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.ad.z;
|
||
import com.dci.intellij.dbn.connection.DatabaseType;
|
||
import com.dci.intellij.dbn.object.DBColumn;
|
||
import com.dci.intellij.dbn.object.DBDataset;
|
||
import com.dci.intellij.dbn.object.DBTable;
|
||
import com.google.common.collect.Lists;
|
||
import java.util.ArrayList;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
import org.mybatis.generator.api.intellij.IntellijColumnInfo;
|
||
|
||
public class a {
|
||
@NotNull
|
||
public static IntellijTableInfo org_mybatis_generator_api_IntellijTableInfo_a(DBDataset dBDataset) {
|
||
Object object;
|
||
DBColumn dBColumn2;
|
||
Object object2;
|
||
IntellijTableInfo intellijTableInfo = new IntellijTableInfo();
|
||
intellijTableInfo.setTableName(dBDataset.getName());
|
||
intellijTableInfo.setDatabaseType(a.java_lang_String_a(dBDataset));
|
||
if (dBDataset instanceof DBTable) {
|
||
object2 = (DBTable)dBDataset;
|
||
intellijTableInfo.setTableRemark(object2.getRemark());
|
||
}
|
||
intellijTableInfo.setTableType(dBDataset.getTypeName());
|
||
object2 = Lists.newArrayList();
|
||
List list = dBDataset.getColumns();
|
||
for (DBColumn dBColumn2 : list) {
|
||
object = a.a(dBColumn2, intellijTableInfo.getDatabaseType());
|
||
object2.add(object);
|
||
}
|
||
intellijTableInfo.setColumnInfos((List)object2);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
if (dBDataset instanceof DBTable && (object = (dBColumn2 = (DBTable)dBDataset).getPrimaryKeyColumns()) != null && !object.isEmpty()) {
|
||
short s2 = 0;
|
||
block1: for (int i2 = 0; i2 < object.size(); ++i2) {
|
||
DBColumn dBColumn3 = (DBColumn)object.get(i2);
|
||
Iterator iterator = object2.iterator();
|
||
while (iterator.hasNext()) {
|
||
IntellijColumnInfo intellijColumnInfo = (IntellijColumnInfo)iterator.next();
|
||
if (!dBColumn3.getName().equals(intellijColumnInfo.getName())) continue;
|
||
IntellijColumnInfo intellijColumnInfo2 = (IntellijColumnInfo)z.a().deepClone((Object)intellijColumnInfo);
|
||
intellijColumnInfo2.setKeySeq(s2);
|
||
arrayList.add(intellijColumnInfo2);
|
||
s2 = (short)(s2 + 1);
|
||
continue block1;
|
||
}
|
||
}
|
||
}
|
||
intellijTableInfo.setPrimaryKeyColumns((List)arrayList);
|
||
return intellijTableInfo;
|
||
}
|
||
|
||
private static String java_lang_String_a(DBDataset dBDataset) {
|
||
DatabaseType databaseType = dBDataset.getConnection().getDatabaseType();
|
||
if (databaseType.equals((Object)DatabaseType.MYSQL)) {
|
||
return "MySql";
|
||
}
|
||
if (databaseType.equals((Object)DatabaseType.ORACLE)) {
|
||
return "Oracle";
|
||
}
|
||
if (databaseType.equals((Object)DatabaseType.POSTGRES)) {
|
||
return "PostgreSQL";
|
||
}
|
||
if (databaseType.equals((Object)DatabaseType.SQLITE)) {
|
||
return "Sqlite";
|
||
}
|
||
return com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDatabase();
|
||
}
|
||
|
||
@NotNull
|
||
public static IntellijColumnInfo a(DBColumn dBColumn, String string) {
|
||
IntellijColumnInfo intellijColumnInfo = new IntellijColumnInfo();
|
||
intellijColumnInfo.setName(dBColumn.getName());
|
||
intellijColumnInfo.setDataType(a.a(dBColumn.getDataType().getName(), dBColumn.getDataType().getPrecision(), string));
|
||
intellijColumnInfo.setGeneratedColumn(false);
|
||
intellijColumnInfo.setAutoIncrement(false);
|
||
intellijColumnInfo.setSize(dBColumn.getDataType().getPrecision());
|
||
intellijColumnInfo.setDecimalDigits(dBColumn.getDataType().getScale());
|
||
intellijColumnInfo.setRemarks(dBColumn.getRemark());
|
||
intellijColumnInfo.setColumnDefaultValue("null");
|
||
intellijColumnInfo.setNullable(Boolean.valueOf(!dBColumn.isNullable()));
|
||
intellijColumnInfo.setKeySeq(dBColumn.getPosition());
|
||
return intellijColumnInfo;
|
||
}
|
||
|
||
private static int a(String string, int n2, String string2) {
|
||
return com.ccnode.codegenerator.ae.a.a(string, n2, string2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.dci.intellij.dbn.language.sql.SQLLanguage
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.lang.Language
|
||
* com.intellij.lang.injection.MultiHostInjector
|
||
* com.intellij.lang.injection.MultiHostRegistrar
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiLanguageInjectionHost
|
||
* com.intellij.psi.XmlRecursiveElementVisitor
|
||
* com.intellij.psi.impl.source.xml.XmlCommentImpl
|
||
* com.intellij.psi.impl.source.xml.XmlTextImpl
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.psi.xml.XmlComment
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.psi.xml.XmlTagValue
|
||
* com.intellij.psi.xml.XmlText
|
||
* com.intellij.util.ObjectUtils
|
||
* kotlin.jvm.internal.Intrinsics
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.O.n;
|
||
import com.ccnode.codegenerator.T.o;
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.w_0;
|
||
import com.ccnode.codegenerator.ag.C;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.ai.a;
|
||
import com.ccnode.codegenerator.ai.g;
|
||
import com.ccnode.codegenerator.ai.i;
|
||
import com.ccnode.codegenerator.ai.j;
|
||
import com.ccnode.codegenerator.g.b;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.dci.intellij.dbn.language.sql.SQLLanguage;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.lang.injection.MultiHostInjector;
|
||
import com.intellij.lang.injection.MultiHostRegistrar;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||
import com.intellij.psi.XmlRecursiveElementVisitor;
|
||
import com.intellij.psi.impl.source.xml.XmlCommentImpl;
|
||
import com.intellij.psi.impl.source.xml.XmlTextImpl;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.psi.xml.XmlComment;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.psi.xml.XmlTagValue;
|
||
import com.intellij.psi.xml.XmlText;
|
||
import com.intellij.util.ObjectUtils;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import kotlin.jvm.internal.Intrinsics;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class d
|
||
implements MultiHostInjector {
|
||
public static final String a = "trim";
|
||
public static final String b = "prefixOverrides";
|
||
public static final String c = "suffixOverrides";
|
||
|
||
public void getLanguagesToInject(@NotNull MultiHostRegistrar multiHostRegistrar, @NotNull PsiElement psiElement) {
|
||
Profile profile = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
boolean bl = profile.getValid();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
boolean bl2 = com.ccnode.codegenerator.g.b.a();
|
||
if (bl2) {
|
||
return;
|
||
}
|
||
if (psiElement instanceof XmlTag) {
|
||
List<com.ccnode.codegenerator.ai.d> list;
|
||
Object object;
|
||
String string = ((XmlTag)psiElement).getName();
|
||
if (!com.ccnode.codegenerator.k.d.var_java_lang_String_b.contains(string)) {
|
||
return;
|
||
}
|
||
XmlTag xmlTag = (XmlTag)ObjectUtils.tryCast((Object)psiElement, XmlTag.class);
|
||
PsiFile psiFile = psiElement.getContainingFile();
|
||
if (!xmlTag.isValid() || !psiFile.isValid()) {
|
||
return;
|
||
}
|
||
boolean bl3 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(psiFile);
|
||
if (!bl3) {
|
||
return;
|
||
}
|
||
VirtualFile virtualFile = psiFile.getVirtualFile();
|
||
boolean bl4 = false;
|
||
if (virtualFile != null && (object = (o)virtualFile.getUserData(C.a)) != null && ((o)object).boolean_a()) {
|
||
long l2 = System.currentTimeMillis();
|
||
long l3 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getReformatLoadingTime();
|
||
if (l2 > ((o)object).long_a() && l2 - ((o)object).long_a() < l3) {
|
||
bl4 = true;
|
||
} else {
|
||
((o)object).a(false);
|
||
virtualFile.putUserData(C.a, object);
|
||
}
|
||
}
|
||
if (profile.getTestWithFormatter()) {
|
||
bl4 = true;
|
||
}
|
||
if (!bl4) {
|
||
object = new Date();
|
||
}
|
||
object = (XmlTag)psiElement;
|
||
if (string.equals("sql")) {
|
||
this.a(multiHostRegistrar, (XmlTag)object, psiFile, bl4);
|
||
return;
|
||
}
|
||
if (!com.ccnode.codegenerator.k.d.var_java_lang_String_a.contains(string)) {
|
||
return;
|
||
}
|
||
if (StringUtils.isBlank((CharSequence)object.getText())) {
|
||
return;
|
||
}
|
||
PsiElement[] psiElementArray = object.getChildren();
|
||
g g2 = new g();
|
||
g2.a(bl4);
|
||
g2.a(xmlTag);
|
||
boolean bl5 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDollarMappingInXmlComment();
|
||
if (bl5) {
|
||
g2.a().putAll(d_0.var_com_ccnode_codegenerator_ad_d_0_a.b((XmlTag)object));
|
||
}
|
||
if ((list = j.a(psiElementArray, g2, true)).size() == 0) {
|
||
return;
|
||
}
|
||
if (bl4) {
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
String string2;
|
||
com.ccnode.codegenerator.ai.d d2;
|
||
int n2;
|
||
com.ccnode.codegenerator.ai.d d3 = list.get(i2);
|
||
if (d3.com_intellij_psi_PsiLanguageInjectionHost_a() instanceof XmlComment) continue;
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
StringBuilder stringBuilder2 = new StringBuilder();
|
||
for (n2 = 0; n2 < i2; ++n2) {
|
||
d2 = list.get(n2);
|
||
string2 = d2.c();
|
||
stringBuilder.append(string2);
|
||
}
|
||
stringBuilder.append(d3.java_lang_String_a());
|
||
stringBuilder2.append(d3.b());
|
||
for (n2 = i2 + 1; n2 < list.size(); ++n2) {
|
||
d2 = list.get(n2);
|
||
string2 = d2.c();
|
||
stringBuilder2.append(string2);
|
||
}
|
||
MultiHostRegistrar multiHostRegistrar2 = null;
|
||
multiHostRegistrar2 = ApplicationManager.getApplication().isUnitTestMode() ? multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE) : multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE);
|
||
multiHostRegistrar2.addPlace(d_0.var_com_ccnode_codegenerator_ad_d_0_a.f(stringBuilder.toString()), d_0.var_com_ccnode_codegenerator_ad_d_0_a.f(stringBuilder2.toString()), d3.com_intellij_psi_PsiLanguageInjectionHost_a(), new TextRange(d3.com_ccnode_codegenerator_ai_c_a().a(), d3.com_ccnode_codegenerator_ai_c_a().b()));
|
||
multiHostRegistrar2.doneInjecting();
|
||
}
|
||
} else {
|
||
MultiHostRegistrar multiHostRegistrar3 = null;
|
||
multiHostRegistrar3 = ApplicationManager.getApplication().isUnitTestMode() ? multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE) : multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE);
|
||
for (com.ccnode.codegenerator.ai.d d4 : list) {
|
||
multiHostRegistrar3.addPlace(d4.java_lang_String_a(), d4.b(), d4.com_intellij_psi_PsiLanguageInjectionHost_a(), new TextRange(d4.com_ccnode_codegenerator_ai_c_a().a(), d4.com_ccnode_codegenerator_ai_c_a().b()));
|
||
}
|
||
multiHostRegistrar3.doneInjecting();
|
||
}
|
||
this.a(multiHostRegistrar, (XmlTag)object, bl4);
|
||
}
|
||
}
|
||
|
||
private void a(@NotNull MultiHostRegistrar multiHostRegistrar, XmlTag xmlTag, boolean bl) {
|
||
new XmlRecursiveElementVisitor(this, bl, multiHostRegistrar){
|
||
final /* synthetic */ boolean var_boolean_a;
|
||
final /* synthetic */ MultiHostRegistrar var_com_intellij_lang_injection_MultiHostRegistrar_a;
|
||
final /* synthetic */ d var_com_ccnode_codegenerator_m_d_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_m_d_a = d2;
|
||
this.var_boolean_a = bl;
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a = multiHostRegistrar;
|
||
}
|
||
|
||
public void visitXmlText(XmlText xmlText) {
|
||
if (xmlText instanceof XmlTextImpl && !this.var_boolean_a) {
|
||
XmlTextImpl xmlTextImpl = (XmlTextImpl)xmlText;
|
||
List<i> list = j.a((XmlText)xmlTextImpl);
|
||
for (i i2 : list) {
|
||
if (!i2.boolean_a()) {
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.startInjecting((Language)n.a);
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.addPlace("", "", (PsiLanguageInjectionHost)xmlTextImpl, new TextRange(i2.int_a(), i2.int_b()));
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.doneInjecting();
|
||
continue;
|
||
}
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.startInjecting((Language)com.intellij.lang.a.a.var_com_intellij_lang_a_a_a);
|
||
int n2 = i2.int_b() - 1;
|
||
int n3 = i2.int_a() + 2;
|
||
if (n2 < n3) {
|
||
System.out.println("off set is not matching");
|
||
}
|
||
if (i2.boolean_b()) {
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.addPlace("%{", "}", (PsiLanguageInjectionHost)xmlTextImpl, new TextRange(n3, n2));
|
||
} else {
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.addPlace("%{", "", (PsiLanguageInjectionHost)xmlTextImpl, new TextRange(n3, i2.int_b()));
|
||
}
|
||
this.var_com_intellij_lang_injection_MultiHostRegistrar_a.doneInjecting();
|
||
}
|
||
}
|
||
}
|
||
|
||
public void visitXmlAttributeValue(XmlAttributeValue xmlAttributeValue) {
|
||
PsiElement psiElement = xmlAttributeValue.getParent();
|
||
if (psiElement != null) {
|
||
PsiElement psiElement2 = psiElement.getParent();
|
||
if (psiElement instanceof XmlAttribute && psiElement2 instanceof XmlTag) {
|
||
String string = ((XmlAttribute)psiElement).getName();
|
||
String string2 = ((XmlTag)psiElement2).getName();
|
||
if ((Intrinsics.areEqual((Object)string2, (Object)"if") || Intrinsics.areEqual((Object)string2, (Object)"when")) && Intrinsics.areEqual((Object)string, (Object)"test")) {
|
||
com.intellij.lang.a.d.a(this.var_com_intellij_lang_injection_MultiHostRegistrar_a, (PsiLanguageInjectionHost)xmlAttributeValue);
|
||
}
|
||
if (Intrinsics.areEqual((Object)string2, (Object)"bind") && Intrinsics.areEqual((Object)string, (Object)"value")) {
|
||
com.intellij.lang.a.d.a(this.var_com_intellij_lang_injection_MultiHostRegistrar_a, (PsiLanguageInjectionHost)xmlAttributeValue);
|
||
}
|
||
if (Intrinsics.areEqual((Object)string2, (Object)"foreach") && Intrinsics.areEqual((Object)string, (Object)"collection")) {
|
||
com.intellij.lang.a.d.a(this.var_com_intellij_lang_injection_MultiHostRegistrar_a, (PsiLanguageInjectionHost)xmlAttributeValue);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}.visitXmlTag(xmlTag);
|
||
}
|
||
|
||
private void a(MultiHostRegistrar multiHostRegistrar, XmlTag xmlTag, PsiFile psiFile, boolean bl) {
|
||
Object i2;
|
||
List<com.ccnode.codegenerator.ai.d> list;
|
||
String string = xmlTag.getText();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
return;
|
||
}
|
||
if (!(psiFile instanceof XmlFile)) {
|
||
return;
|
||
}
|
||
ArrayList arrayList = Lists.newArrayList((Object[])new XmlFile[]{(XmlFile)psiFile});
|
||
String string2 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(arrayList);
|
||
PsiElement[] psiElementArray = xmlTag.getChildren();
|
||
g g2 = new g();
|
||
g2.a(bl);
|
||
g2.a(xmlTag);
|
||
boolean bl2 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDollarMappingInXmlComment();
|
||
if (bl2) {
|
||
g2.a().putAll(d_0.var_com_ccnode_codegenerator_ad_d_0_a.b(xmlTag));
|
||
}
|
||
if ((list = j.a(psiElementArray, g2, true)).size() == 0) {
|
||
return;
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
boolean bl3 = true;
|
||
for (com.ccnode.codegenerator.ai.d object22 : list) {
|
||
i2 = object22.c();
|
||
if (object22.com_intellij_psi_PsiLanguageInjectionHost_a() instanceof XmlCommentImpl) {
|
||
bl3 = false;
|
||
}
|
||
stringBuilder.append((String)i2);
|
||
}
|
||
String string3 = stringBuilder.toString().trim().toLowerCase();
|
||
ProjectProfile projectProfile = e.com_ccnode_codegenerator_ag_e_e_a(xmlTag.getProject()).a().getProjectProfile();
|
||
if (projectProfile.getAutoInjectPrefixAndSuffixForSqlTag() && ((a)(i2 = d.a(xmlTag))).boolean_a()) {
|
||
bl3 = false;
|
||
list.get(0).d(((a)i2).java_lang_String_a());
|
||
if (StringUtils.isNotBlank((CharSequence)string2)) {
|
||
list.get(list.size() - 1).e(((a)i2).b());
|
||
}
|
||
}
|
||
if (bl3 && this.a(string3)) {
|
||
bl3 = false;
|
||
}
|
||
if (bl3) {
|
||
list.get(0).d("select ");
|
||
if (StringUtils.isNotBlank((CharSequence)string2)) {
|
||
list.get(list.size() - 1).e(" from " + string2);
|
||
}
|
||
}
|
||
if (bl) {
|
||
for (int i3 = 0; i3 < list.size(); ++i3) {
|
||
String string4;
|
||
com.ccnode.codegenerator.ai.d d2;
|
||
int n2;
|
||
com.ccnode.codegenerator.ai.d d3 = list.get(i3);
|
||
if (d3.com_intellij_psi_PsiLanguageInjectionHost_a() instanceof XmlComment) continue;
|
||
StringBuilder d4 = new StringBuilder();
|
||
StringBuilder stringBuilder2 = new StringBuilder();
|
||
for (n2 = 0; n2 < i3; ++n2) {
|
||
d2 = list.get(n2);
|
||
string4 = d2.c();
|
||
d4.append(string4);
|
||
}
|
||
d4.append(d3.java_lang_String_a());
|
||
stringBuilder2.append(d3.b());
|
||
for (n2 = i3 + 1; n2 < list.size(); ++n2) {
|
||
d2 = list.get(n2);
|
||
string4 = d2.c();
|
||
stringBuilder2.append(string4);
|
||
}
|
||
MultiHostRegistrar n22 = null;
|
||
n22 = ApplicationManager.getApplication().isUnitTestMode() ? multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE) : multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE);
|
||
multiHostRegistrar.addPlace(d_0.var_com_ccnode_codegenerator_ad_d_0_a.f(d4.toString()), d_0.var_com_ccnode_codegenerator_ad_d_0_a.f(stringBuilder2.toString()), d3.com_intellij_psi_PsiLanguageInjectionHost_a(), new TextRange(d3.com_ccnode_codegenerator_ai_c_a().a(), d3.com_ccnode_codegenerator_ai_c_a().b()));
|
||
n22.doneInjecting();
|
||
}
|
||
} else {
|
||
i2 = multiHostRegistrar.startInjecting((Language)SQLLanguage.INSTANCE);
|
||
for (com.ccnode.codegenerator.ai.d d4 : list) {
|
||
i2.addPlace(d4.java_lang_String_a(), d4.b(), d4.com_intellij_psi_PsiLanguageInjectionHost_a(), new TextRange(d4.com_ccnode_codegenerator_ai_c_a().a(), d4.com_ccnode_codegenerator_ai_c_a().b()));
|
||
}
|
||
i2.doneInjecting();
|
||
}
|
||
this.a(multiHostRegistrar, xmlTag, bl);
|
||
}
|
||
|
||
public static a a(XmlTag xmlTag) {
|
||
Object object;
|
||
String string;
|
||
Object object22;
|
||
a a2 = new a();
|
||
Project project = xmlTag.getProject();
|
||
XmlAttribute xmlAttribute = xmlTag.getAttribute("id");
|
||
if (xmlAttribute == null) {
|
||
a2.a(false);
|
||
return a2;
|
||
}
|
||
XmlAttributeValue xmlAttributeValue = xmlAttribute.getValueElement();
|
||
if (xmlAttributeValue == null) {
|
||
a2.a(false);
|
||
return a2;
|
||
}
|
||
PsiFile psiFile = xmlTag.getContainingFile();
|
||
XmlFile xmlFile = (XmlFile)psiFile;
|
||
XmlTag[] xmlTagArray = xmlFile.getRootTag().getSubTags();
|
||
Object object3 = null;
|
||
XmlTag xmlTag2 = null;
|
||
for (Object object22 : xmlTagArray) {
|
||
string = "refid=\"" + xmlAttributeValue.getValue() + "\"";
|
||
boolean bl = object22.getText().contains(string);
|
||
if (!bl) continue;
|
||
object3 = object22;
|
||
int n2 = object22.getText().indexOf(string);
|
||
int n3 = object22.getTextRange().getStartOffset();
|
||
int n4 = n3 + n2;
|
||
object = object22.getContainingFile().findElementAt(n4);
|
||
xmlTag2 = (XmlTag)object.getParent().getParent();
|
||
break;
|
||
}
|
||
if (object3 == null) {
|
||
a2.a(false);
|
||
return a2;
|
||
}
|
||
XmlTag[] xmlTagArray2 = xmlTag2;
|
||
TextRange textRange = xmlTagArray2.getTextRange();
|
||
XmlTagValue xmlTagValue = object3.getValue();
|
||
object22 = xmlTagValue.getText();
|
||
string = xmlTagValue.getTextRange();
|
||
HashMap hashMap = Maps.newHashMap();
|
||
HashSet hashSet = Sets.newHashSet();
|
||
String string2 = w_0.a.a(object3.getChildren(), hashMap, hashSet, true, new TextRange(string.getStartOffset(), textRange.getStartOffset()));
|
||
String string3 = w_0.a.a(object3.getChildren(), hashMap, hashSet, true, new TextRange(textRange.getEndOffset(), string.getEndOffset()));
|
||
object = " " + w_0.a.java_lang_String_a(string3).trim() + " ";
|
||
String string4 = " " + string2.trim() + " ";
|
||
a2.a(true);
|
||
a2.a(string4);
|
||
a2.b((String)object);
|
||
return a2;
|
||
}
|
||
|
||
private boolean a(String string) {
|
||
String string2 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.e(string);
|
||
String string3 = string2.trim();
|
||
ArrayList arrayList = Lists.newArrayList((Object[])new String[]{"insert", "update", "delete", "select", "begin"});
|
||
for (String string4 : arrayList) {
|
||
if (!string3.startsWith(string4)) continue;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
private XmlTag a(XmlTextImpl xmlTextImpl) {
|
||
for (PsiElement psiElement = xmlTextImpl.getParent(); psiElement != null; psiElement = psiElement.getParent()) {
|
||
XmlTag xmlTag;
|
||
String string;
|
||
boolean bl = psiElement instanceof XmlTag;
|
||
if (!bl || !com.ccnode.codegenerator.k.d.var_java_lang_String_a.contains(string = (xmlTag = (XmlTag)psiElement).getName())) continue;
|
||
return (XmlTag)psiElement;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@NotNull
|
||
public List<? extends Class<? extends PsiElement>> elementsToInjectIn() {
|
||
return Arrays.asList(XmlTag.class);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class e
|
||
implements DefaultLiveTemplatesProvider {
|
||
public String[] getDefaultLiveTemplateFiles() {
|
||
return new String[]{"liveTemplates/mybatisSqlNavigatorTemplates"};
|
||
}
|
||
|
||
@Nullable
|
||
public String[] getHiddenLiveTemplateFiles() {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.dci.intellij.dbn.language.sql.SQLFile
|
||
* com.intellij.codeInsight.template.TemplateContextType
|
||
* com.intellij.lang.injection.InjectedLanguageManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.dci.intellij.dbn.language.sql.SQLFile;
|
||
import com.intellij.codeInsight.template.TemplateContextType;
|
||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class f
|
||
extends TemplateContextType {
|
||
protected f() {
|
||
super("MybatisNavigatorSql", "MybatisNavigatorSqlContext");
|
||
}
|
||
|
||
public boolean isInContext(@NotNull PsiFile psiFile, int n2) {
|
||
if (!(psiFile instanceof SQLFile)) {
|
||
return false;
|
||
}
|
||
PsiFile psiFile2 = InjectedLanguageManager.getInstance((Project)psiFile.getProject()).getTopLevelFile((PsiElement)psiFile);
|
||
if (psiFile2 == null) {
|
||
return false;
|
||
}
|
||
return d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(psiFile2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.g.a;
|
||
|
||
public class g
|
||
implements a {
|
||
@Override
|
||
public void a() {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.datasourceToolWindow.dbInfo;
|
||
|
||
import com.google.common.collect.Lists;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public enum DBType {
|
||
Oracle("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@%s:%s:%s", "oracleJDBC.jar"),
|
||
MySql("com.mysql.cj.jdbc.Driver", "jdbc:mysql://%s:%s/%s?useUnicode=true&useSSL=false&characterEncoding=%s&useLegacyDatetimeCode=false&serverTimezone=UTC&allowPublicKeyRetrieval=true", "mysqlJDBC.jar"),
|
||
SqlServer("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://%s:%s;databaseName=%s", "sqlserverJDBC.jar"),
|
||
PostgreSQL("org.postgresql.Driver", "jdbc:postgresql://%s", "postgresqlJDBC.jar"),
|
||
Sqlite("org.sqlite.JDBC", "jdbc:sqlite://%s", "sqliteJDBC.jar");
|
||
|
||
private final String driverClass;
|
||
private final String connectionUrlPattern;
|
||
private final String connectorJarFile;
|
||
|
||
private DBType(String string2, String string3, String string4) {
|
||
this.driverClass = string2;
|
||
this.connectionUrlPattern = string3;
|
||
this.connectorJarFile = string4;
|
||
}
|
||
|
||
public String getDriverClass() {
|
||
return this.driverClass;
|
||
}
|
||
|
||
public String getConnectionUrlPattern() {
|
||
return this.connectionUrlPattern;
|
||
}
|
||
|
||
public String getConnectorJarFile() {
|
||
return this.connectorJarFile;
|
||
}
|
||
|
||
public static List<String> getAllDatabaseSources() {
|
||
DBType[] dBTypeArray;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (DBType dBType : dBTypeArray = DBType.values()) {
|
||
arrayList.add(dBType.name());
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Nullable
|
||
public static String[] getTableType(@NotNull String string) {
|
||
switch (string) {
|
||
case "MySql": {
|
||
return new String[]{"TABLE"};
|
||
}
|
||
case "Oracle": {
|
||
return new String[]{"TABLE"};
|
||
}
|
||
case "PostgreSQL": {
|
||
return new String[]{"TABLE"};
|
||
}
|
||
case "SqlServer": {
|
||
return new String[]{"TABLE"};
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.datasourceToolWindow.dbInfo;
|
||
|
||
public class TableColumnInfo {
|
||
private String fieldName;
|
||
private String fieldType;
|
||
|
||
public String getFieldType() {
|
||
return this.fieldType;
|
||
}
|
||
|
||
public void setFieldType(String string) {
|
||
this.fieldType = string;
|
||
}
|
||
|
||
public String getFieldName() {
|
||
return this.fieldName;
|
||
}
|
||
|
||
public void setFieldName(String string) {
|
||
this.fieldName = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.TextComponentAccessor
|
||
* com.intellij.structuralsearch.plugin.ui.TextFieldWithAutoCompletionWithBrowseButton
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.datasourceToolWindow;
|
||
|
||
import com.ccnode.codegenerator.ad.i;
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.ConnectResult;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DBType;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseConnector;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.TextComponentAccessor;
|
||
import com.intellij.structuralsearch.plugin.ui.TextFieldWithAutoCompletionWithBrowseButton;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.sql.Connection;
|
||
import java.sql.DatabaseMetaData;
|
||
import java.sql.ResultSet;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.DefaultComboBoxModel;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import javax.swing.Timer;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JTextField var_javax_swing_JTextField_c;
|
||
private JButton var_javax_swing_JButton_c;
|
||
private JComboBox var_javax_swing_JComboBox_a;
|
||
private JLabel var_javax_swing_JLabel_a;
|
||
private JTextField d;
|
||
private JLabel var_javax_swing_JLabel_b;
|
||
private JLabel var_javax_swing_JLabel_c;
|
||
public TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
public TextFieldWithAutoCompletionWithBrowseButton var_com_intellij_structuralsearch_plugin_ui_TextFieldWithAutoCompletionWithBrowseButton_a;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public JButton var_javax_swing_JButton_b;
|
||
private NewDatabaseInfo var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public a(@Nullable Project project, boolean bl) {
|
||
super(project, bl);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.void_a();
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
BrowserUtil.browse((String)"https://plugins.jetbrains.com/plugin/20294-databasehelper");
|
||
}
|
||
});
|
||
this.setTitle("add database config");
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
this.var_javax_swing_JLabel_c.setText("url(host:port)");
|
||
this.var_javax_swing_JTextField_a.setPreferredSize(new Dimension(500, 20));
|
||
this.var_javax_swing_JComboBox_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (a.this.var_javax_swing_JComboBox_a.getModel().getSelectedItem().equals("MySql")) {
|
||
a.this.var_javax_swing_JLabel_c.setText("url(host:port)");
|
||
a.this.var_javax_swing_JTextField_a.setText("localhost:3306");
|
||
a.this.var_javax_swing_JTextField_b.setText("root");
|
||
a.this.var_javax_swing_JTextField_c.setText("");
|
||
a.this.var_javax_swing_JLabel_b.setText("database(must)");
|
||
a.this.d.setText("");
|
||
} else if (a.this.var_javax_swing_JComboBox_a.getSelectedItem().equals("Oracle")) {
|
||
a.this.var_javax_swing_JLabel_c.setText("url(host:port:sid)");
|
||
a.this.var_javax_swing_JTextField_a.setText("localhost:1521:XE");
|
||
a.this.var_javax_swing_JTextField_b.setText("SYSTEM");
|
||
a.this.var_javax_swing_JTextField_c.setText("oracle");
|
||
a.this.d.setText("HR");
|
||
a.this.var_javax_swing_JLabel_b.setText("schema(must)");
|
||
} else if (a.this.var_javax_swing_JComboBox_a.getSelectedItem().equals("PostgreSQL")) {
|
||
a.this.var_javax_swing_JLabel_c.setText("url(host:port/database)");
|
||
a.this.var_javax_swing_JTextField_a.setText("localhost:5432/postgres");
|
||
a.this.var_javax_swing_JTextField_b.setText("postgres");
|
||
a.this.var_javax_swing_JTextField_c.setText("");
|
||
a.this.var_javax_swing_JLabel_b.setText("schema");
|
||
a.this.d.setText("public");
|
||
} else if (a.this.var_javax_swing_JComboBox_a.getSelectedItem().equals("SqlServer")) {
|
||
a.this.var_javax_swing_JLabel_c.setText("url(host:port)");
|
||
a.this.var_javax_swing_JTextField_a.setText("localhost:1433;instanceName=MSSQLSERVER");
|
||
a.this.var_javax_swing_JTextField_b.setText("root2");
|
||
a.this.var_javax_swing_JTextField_c.setText("world");
|
||
a.this.d.setText("master");
|
||
a.this.var_javax_swing_JLabel_b.setText("database(must)");
|
||
}
|
||
try {
|
||
DBType dBType = DBType.valueOf(a.this.var_javax_swing_JComboBox_a.getSelectedItem().toString());
|
||
String string = dBType.getDriverClass();
|
||
a.this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText(string);
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_c.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
NewDatabaseInfo newDatabaseInfo = a.this.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_b();
|
||
ConnectResult connectResult = DatabaseConnector.INSTANCE.checkConnection(newDatabaseInfo);
|
||
if (!connectResult.isSuccess()) {
|
||
Messages.showErrorDialog((Project)a.this.var_com_intellij_openapi_project_Project_a, (String)("the exception is:" + connectResult.getErrorMessage()), (String)"connect fail");
|
||
} else {
|
||
a.this.var_javax_swing_JLabel_a.setText("success");
|
||
Timer timer = new Timer(4000, new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
a.this.var_javax_swing_JLabel_a.setText(null);
|
||
}
|
||
});
|
||
timer.setRepeats(false);
|
||
timer.start();
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_a.setVisible(false);
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
NewDatabaseInfo newDatabaseInfo = a.this.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_b();
|
||
try {
|
||
Connection connection = DatabaseConnector.INSTANCE.getConnection(newDatabaseInfo);
|
||
DatabaseMetaData databaseMetaData = connection.getMetaData();
|
||
ResultSet resultSet = databaseMetaData.getSchemas();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append("List of schemas: \n");
|
||
while (resultSet.next()) {
|
||
stringBuilder.append("schema is:" + resultSet.getString(1) + ",catalog is: " + resultSet.getString(2) + "\n");
|
||
}
|
||
Messages.showInfoMessage((Project)a.this.var_com_intellij_openapi_project_Project_a, (String)stringBuilder.toString(), (String)"Schema Info");
|
||
connection.close();
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)a.this.var_com_intellij_openapi_project_Project_a, (String)("the exception is:" + i.var_com_ccnode_codegenerator_ad_i_a.a(exception)), (String)"connect fail");
|
||
}
|
||
}
|
||
});
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@NotNull
|
||
private NewDatabaseInfo com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_b() {
|
||
NewDatabaseInfo newDatabaseInfo = new NewDatabaseInfo();
|
||
newDatabaseInfo.setDatabaseType((String)this.var_javax_swing_JComboBox_a.getSelectedItem());
|
||
newDatabaseInfo.setUrl(this.var_javax_swing_JTextField_a.getText());
|
||
newDatabaseInfo.setUserName(this.var_javax_swing_JTextField_b.getText());
|
||
newDatabaseInfo.setPassword(this.var_javax_swing_JTextField_c.getText());
|
||
newDatabaseInfo.setDatabase(this.d.getText());
|
||
newDatabaseInfo.setDriverClass(this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText());
|
||
newDatabaseInfo.setDriverPath(this.var_com_intellij_structuralsearch_plugin_ui_TextFieldWithAutoCompletionWithBrowseButton_a.getText());
|
||
return newDatabaseInfo;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
Object object = this.var_javax_swing_JComboBox_a.getSelectedItem();
|
||
if ((object.equals("MySql") || object.equals("SqlServer")) && StringUtils.isEmpty((String)this.d.getText())) {
|
||
Messages.showErrorDialog((String)"the database should not empty", (String)"database is empty");
|
||
return;
|
||
}
|
||
if (object.equals("Oracle") && StringUtils.isEmpty((String)this.d.getText())) {
|
||
Messages.showErrorDialog((String)"the schema should not empty", (String)"schema is empty");
|
||
return;
|
||
}
|
||
NewDatabaseInfo newDatabaseInfo = this.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_b();
|
||
ConnectResult connectResult = DatabaseConnector.INSTANCE.checkConnection(newDatabaseInfo);
|
||
if (connectResult.isSuccess()) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a = this.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_b();
|
||
super.doOKAction();
|
||
} else {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)("make sure you can connect to the database, the exception is:" + connectResult.getErrorMessage()), (String)"database connect fail");
|
||
}
|
||
}
|
||
|
||
public NewDatabaseInfo com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a() {
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.void_b();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, "West");
|
||
Spacer spacer = new Spacer();
|
||
jPanel.add((Component)spacer, new GridConstraints(1, 1, 2, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
Spacer spacer2 = new Spacer();
|
||
jPanel.add((Component)spacer2, new GridConstraints(3, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(11, 5, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel2, "Center");
|
||
this.var_javax_swing_JLabel_c = new JLabel();
|
||
this.a(this.var_javax_swing_JLabel_c, this.a("i18n/i18n", "url"));
|
||
jPanel2.add((Component)this.var_javax_swing_JLabel_c, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer3 = new Spacer();
|
||
jPanel2.add((Component)spacer3, new GridConstraints(10, 1, 1, 3, 0, 2, 1, 4, null, null, null, 0, false));
|
||
Spacer spacer4 = new Spacer();
|
||
jPanel2.add((Component)spacer4, new GridConstraints(1, 4, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
Spacer spacer5 = new Spacer();
|
||
jPanel2.add((Component)spacer5, new GridConstraints(8, 1, 1, 3, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.a(this.var_javax_swing_JButton_c, this.a("i18n/i18n", "testconnection"));
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_c, new GridConstraints(7, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "username"));
|
||
jPanel2.add((Component)jLabel, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
this.var_javax_swing_JTextField_b.setText("root");
|
||
jPanel2.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(2, 1, 1, 3, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "datasource"));
|
||
jPanel2.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
DefaultComboBoxModel<String> defaultComboBoxModel = new DefaultComboBoxModel<String>();
|
||
defaultComboBoxModel.addElement("MySql");
|
||
defaultComboBoxModel.addElement("Oracle");
|
||
defaultComboBoxModel.addElement("PostgreSQL");
|
||
defaultComboBoxModel.addElement("SqlServer");
|
||
this.var_javax_swing_JComboBox_a.setModel(defaultComboBoxModel);
|
||
jPanel2.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 1, 1, 3, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
this.var_javax_swing_JTextField_c.setText("");
|
||
jPanel2.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(3, 1, 1, 3, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "password"));
|
||
jPanel2.add((Component)jLabel3, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.var_javax_swing_JLabel_a.setText("");
|
||
jPanel2.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(7, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JLabel_b = new JLabel();
|
||
this.a(this.var_javax_swing_JLabel_b, this.a("i18n/i18n", "database.must"));
|
||
jPanel2.add((Component)this.var_javax_swing_JLabel_b, new GridConstraints(6, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.d = new JTextField();
|
||
jPanel2.add((Component)this.d, new GridConstraints(6, 1, 1, 3, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
this.var_javax_swing_JTextField_a.setText("localhost:3306");
|
||
jPanel2.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(1, 1, 1, 3, 8, 1, 4, 0, null, new Dimension(400, -1), null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
jLabel4.setText("driver(optional)");
|
||
jPanel2.add((Component)jLabel4, new GridConstraints(4, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
jLabel5.setText("driverJarPath(optional)");
|
||
jPanel2.add((Component)jLabel5, new GridConstraints(5, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel2.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_a, new GridConstraints(4, 1, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel2.add((Component)this.var_com_intellij_structuralsearch_plugin_ui_TextFieldWithAutoCompletionWithBrowseButton_a, new GridConstraints(5, 1, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "getschema"));
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(7, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.a(this.var_javax_swing_JButton_b, this.a("i18n/i18n", "more.database.support"));
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(7, 3, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void void_b() {
|
||
ArrayList arrayList = Lists.newArrayList((Object[])new String[]{"com.mysql.jdbc.Driver", "com.mysql.cj.jdbc.Driver", "oracle.jdbc.driver.OracleDriver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "org.sqlite.JDBC"});
|
||
ArrayList<String> arrayList2 = t_0.var_com_ccnode_codegenerator_ad_t_0_a.a(this.var_com_intellij_openapi_project_Project_a);
|
||
for (String string : arrayList2) {
|
||
if (!arrayList.contains(string)) continue;
|
||
arrayList.add(string);
|
||
}
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, (Collection)arrayList, (boolean)true, null);
|
||
this.var_com_intellij_structuralsearch_plugin_ui_TextFieldWithAutoCompletionWithBrowseButton_a = new TextFieldWithAutoCompletionWithBrowseButton(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_intellij_structuralsearch_plugin_ui_TextFieldWithAutoCompletionWithBrowseButton_a.addBrowseFolderListener("Select Driver Jar", "Select Driver Jar", this.var_com_intellij_openapi_project_Project_a, FileChooserDescriptorFactory.createSingleFileDescriptor(), (TextComponentAccessor)new a());
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
|
||
private static class a
|
||
implements TextComponentAccessor<TextFieldWithAutoCompletion<String>> {
|
||
private a() {
|
||
}
|
||
|
||
public String a(TextFieldWithAutoCompletion textFieldWithAutoCompletion) {
|
||
String string = textFieldWithAutoCompletion.getText();
|
||
return string.replace("\\", "/");
|
||
}
|
||
|
||
public void a(TextFieldWithAutoCompletion textFieldWithAutoCompletion, @NotNull String string) {
|
||
textFieldWithAutoCompletion.setText(string.replace("\\", "/"));
|
||
}
|
||
|
||
public /* synthetic */ void setText(Component component, @NotNull String string) {
|
||
this.a((TextFieldWithAutoCompletion)component, string);
|
||
}
|
||
|
||
public /* synthetic */ String getText(Component component) {
|
||
return this.a((TextFieldWithAutoCompletion)component);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import javax.swing.DefaultCellEditor;
|
||
import javax.swing.JCheckBox;
|
||
|
||
public class a
|
||
extends DefaultCellEditor {
|
||
public a(JCheckBox jCheckBox) {
|
||
super(jCheckBox);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import java.awt.Component;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellRenderer;
|
||
|
||
public class b
|
||
extends JCheckBox
|
||
implements TableCellRenderer {
|
||
@Override
|
||
public Component getTableCellRendererComponent(JTable jTable, Object object, boolean bl, boolean bl2, int n2, int n3) {
|
||
this.setSelected(object != null && (Boolean)object != false);
|
||
return this;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.List;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends DialogWrapper {
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private Integer var_java_lang_Integer_a = 0;
|
||
|
||
public Integer a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public c(@Nullable Project project, List<String> list) {
|
||
super(project, true);
|
||
this.var_java_util_List_java_lang_String__a = list;
|
||
this.setTitle("exist mutiple parse result");
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.anchor = 17;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
|
||
jPanel.add((Component)new JLabel("please choose one"), gridBagConstraints);
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
for (int i2 = 0; i2 < this.var_java_util_List_java_lang_String__a.size(); ++i2) {
|
||
gridBagConstraints.gridx = 0;
|
||
++gridBagConstraints.gridy;
|
||
JTextArea jTextArea = new JTextArea(this.var_java_util_List_java_lang_String__a.get(i2));
|
||
jTextArea.setEditable(false);
|
||
jPanel.add((Component)jTextArea, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JRadioButton jRadioButton = new JRadioButton("", true);
|
||
jRadioButton.setActionCommand(String.valueOf(i2));
|
||
jRadioButton.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = actionEvent.getActionCommand();
|
||
c.this.var_java_lang_Integer_a = Integer.parseInt(string);
|
||
}
|
||
});
|
||
buttonGroup.add(jRadioButton);
|
||
jPanel.add((Component)jRadioButton, gridBagConstraints);
|
||
}
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.gridy = 2;
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.G.h.a;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.List;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d
|
||
extends DialogWrapper {
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_G_h_a__a;
|
||
private Integer var_java_lang_Integer_a = 0;
|
||
|
||
public Integer a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public d(@Nullable Project project, List<a> list) {
|
||
super(project, true);
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_h_a__a = list;
|
||
this.setTitle("exist mutiple parse result");
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.anchor = 17;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
|
||
jPanel.add((Component)new JLabel("please choose one"), gridBagConstraints);
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
for (int i2 = 0; i2 < this.var_java_util_List_com_ccnode_codegenerator_G_h_a__a.size(); ++i2) {
|
||
gridBagConstraints.gridx = 0;
|
||
++gridBagConstraints.gridy;
|
||
JTextArea jTextArea = new JTextArea(this.var_java_util_List_com_ccnode_codegenerator_G_h_a__a.get(i2).com_intellij_psi_xml_XmlTag_a().getText());
|
||
jTextArea.setEditable(false);
|
||
jPanel.add((Component)jTextArea, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JRadioButton jRadioButton = new JRadioButton("", true);
|
||
jRadioButton.setActionCommand(String.valueOf(i2));
|
||
jRadioButton.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = actionEvent.getActionCommand();
|
||
d.this.var_java_lang_Integer_a = Integer.parseInt(string);
|
||
}
|
||
});
|
||
buttonGroup.add(jRadioButton);
|
||
jPanel.add((Component)jRadioButton, gridBagConstraints);
|
||
}
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.gridy = 2;
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.gson.Gson
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.application.impl.ApplicationImpl
|
||
* com.intellij.openapi.ui.Messages
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.FileUtils
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.af.b.a;
|
||
import com.ccnode.codegenerator.af.d.f;
|
||
import com.ccnode.codegenerator.af.f.b;
|
||
import com.ccnode.codegenerator.af.f.c;
|
||
import com.ccnode.codegenerator.af.f.d;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.gson.Gson;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.application.impl.ApplicationImpl;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import java.io.File;
|
||
import java.util.Base64;
|
||
import java.util.Calendar;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.FileUtils;
|
||
|
||
public class e {
|
||
public static void a() {
|
||
Object object;
|
||
Calendar calendar = Calendar.getInstance();
|
||
calendar.add(12, -5);
|
||
boolean bl = true;
|
||
try {
|
||
object = new File(a.java_lang_String_a("mybatisCodeHelperPro"));
|
||
String string = FileUtils.readFileToString((File)object, (String)"UTF-8");
|
||
byte[] byArray = null;
|
||
try {
|
||
byArray = d.b(d.java_security_interfaces_RSAPublicKey_a(new String(Base64.getDecoder().decode("TUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDZzUyUjExV0h1MysvNUV2WnhkS0l2a3ovekpnS2VNUUhNLytMVkxSZS9zWUpFQlUxbUUrODc3MmJJckk4UThscldqSHc5cmVjQ1RWVVhXUnhWYXBndk1HYTZ3KzU4STZwYXdSaFhwZDBrRkhUY2xxeUZGWFpoS3ZiQUtoblphRGNuZkJtSkhObTQwR0JFTGpCTmx5MXpha2FIblFmUzF0QlhaSGQwOUV0c2VRSURBUUFC"), Charsets.UTF_8)), Base64.getDecoder().decode(string));
|
||
}
|
||
catch (b b2) {
|
||
byArray = d.b(new c(), Base64.getDecoder().decode(string));
|
||
}
|
||
f f2 = null;
|
||
f2 = (f)new Gson().fromJson(new String(byArray, "UTF-8"), f.class);
|
||
String string2 = f2.java_lang_String_a();
|
||
if (string2.equals("keyNotExist") || string2.equals("feimao") || string2.contains("<22><><CF><D0>") || string2.contains("<22><><BC><A4><BB><EE>")) {
|
||
bl = false;
|
||
} else {
|
||
if (f2.java_lang_Long_a() > calendar.getTime().getTime()) {
|
||
return;
|
||
}
|
||
bl = false;
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
bl = false;
|
||
}
|
||
object = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
((Profile)object).setIfUseNewMapping(((Profile)object).getIfUseNewMapping() + 1);
|
||
if (((Profile)object).getIfUseNewMapping() > Integer.valueOf("100")) {
|
||
((Profile)object).setIfUseNewMapping(Integer.valueOf("80"));
|
||
try {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
Messages.showErrorDialog((String)"<22><><C4><E3><D5><FD>ʹ<DA><CAB9><D3>ƽ<C6><C6BD><E2><B0><E6>MybatisCodeHelperPro<72><6F><B2><E5><BC><FE><A3><AC><BD><AB><BB><E1><C9>ɴ<B3><C9B4><ED><CE>Ĵ<B5><C4B4><FA><C2><EB><BA><CD><D4>ɵ<B3><C9B5>Կ<C4><D4BF><A8><C2>뵽 https://brucege.com/pay/view <20><><B9><BA><C2><F2><D5><FD>", (String)"MybatisCodeHelperPro<72><6F><B2><E5><BC><FE><B7><C7><D5><FD>");
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(false);
|
||
ApplicationImpl applicationImpl = (ApplicationImpl)ApplicationManager.getApplication();
|
||
applicationImpl.exit(true, true);
|
||
}
|
||
});
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiField
|
||
*/
|
||
package com.ccnode.codegenerator.n.a;
|
||
|
||
import com.intellij.psi.PsiField;
|
||
|
||
public class a {
|
||
private String var_java_lang_String_a;
|
||
private String b;
|
||
private PsiField var_com_intellij_psi_PsiField_a;
|
||
private String c;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.c;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.c = string;
|
||
}
|
||
|
||
public PsiField com_intellij_psi_PsiField_a() {
|
||
return this.var_com_intellij_psi_PsiField_a;
|
||
}
|
||
|
||
public void a(PsiField psiField) {
|
||
this.var_com_intellij_psi_PsiField_a = psiField;
|
||
}
|
||
|
||
public String b() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public String c() {
|
||
return this.b;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n.a;
|
||
|
||
public class b {
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private Boolean var_java_lang_Boolean_b;
|
||
private String var_java_lang_String_c;
|
||
private Boolean var_java_lang_Boolean_c;
|
||
private Boolean d;
|
||
private Boolean e;
|
||
private Integer var_java_lang_Integer_a;
|
||
|
||
public Integer java_lang_Integer_a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public void a(Integer n2) {
|
||
this.var_java_lang_Integer_a = n2;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.d;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.d = bl;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_b() {
|
||
return this.e;
|
||
}
|
||
|
||
public void b(Boolean bl) {
|
||
this.e = bl;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_c() {
|
||
return this.var_java_lang_Boolean_c;
|
||
}
|
||
|
||
public void c(Boolean bl) {
|
||
this.var_java_lang_Boolean_c = bl;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public Boolean d() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void d(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public Boolean e() {
|
||
return this.var_java_lang_Boolean_b;
|
||
}
|
||
|
||
public void e(Boolean bl) {
|
||
this.var_java_lang_Boolean_b = bl;
|
||
}
|
||
|
||
public String java_lang_String_c() {
|
||
return this.var_java_lang_String_c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.var_java_lang_String_c = string;
|
||
}
|
||
|
||
public b(String string, String string2, String string3) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_java_lang_String_b = string2;
|
||
this.var_java_lang_String_c = string3;
|
||
this.var_java_lang_Boolean_a = false;
|
||
this.var_java_lang_Boolean_b = false;
|
||
this.var_java_lang_Boolean_c = false;
|
||
this.d = false;
|
||
this.e = true;
|
||
}
|
||
|
||
public b() {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n.b.a;
|
||
|
||
public final class g
|
||
extends Enum<g> {
|
||
public static final /* enum */ g var_com_ccnode_codegenerator_n_b_a_g_a;
|
||
public static final /* enum */ g b;
|
||
public static final /* enum */ g c;
|
||
public static final /* enum */ g d;
|
||
private static final /* synthetic */ g[] var_com_ccnode_codegenerator_n_b_a_g_arr_a;
|
||
|
||
public static g[] a() {
|
||
return (g[])var_com_ccnode_codegenerator_n_b_a_g_arr_a.clone();
|
||
}
|
||
|
||
public static g a(String string) {
|
||
return Enum.valueOf(g.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ g[] b() {
|
||
return new g[]{var_com_ccnode_codegenerator_n_b_a_g_a, b, c, d};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_n_b_a_g_a = new g();
|
||
b = new g();
|
||
c = new g();
|
||
d = new g();
|
||
var_com_ccnode_codegenerator_n_b_a_g_arr_a = g.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NonNls
|
||
*/
|
||
package com.ccnode.codegenerator.n.c;
|
||
|
||
import org.jetbrains.annotations.NonNls;
|
||
|
||
public class a
|
||
extends RuntimeException {
|
||
public a() {
|
||
}
|
||
|
||
public a(@NonNls String string) {
|
||
super(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NonNls
|
||
*/
|
||
package com.ccnode.codegenerator.n.c;
|
||
|
||
import org.jetbrains.annotations.NonNls;
|
||
|
||
public class b
|
||
extends RuntimeException {
|
||
public b() {
|
||
}
|
||
|
||
public b(@NonNls String string) {
|
||
super(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.CodeInsightUtil
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.DialogWrapper$IdeModalityType
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.codeStyle.CodeStyleManager
|
||
* com.intellij.psi.codeStyle.JavaCodeStyleManager
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n.d;
|
||
|
||
import com.ccnode.codegenerator.ad.g_0;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.l.f;
|
||
import com.ccnode.codegenerator.n.e.b;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.CodeInsightUtil;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.codeStyle.CodeStyleManager;
|
||
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTable;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private final List<g_0> var_java_util_List_com_ccnode_codegenerator_ad_g_0__a;
|
||
@Nullable
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private final PsiClass var_com_intellij_psi_PsiClass_a;
|
||
public JTable var_javax_swing_JTable_a;
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JRadioButton var_javax_swing_JRadioButton_a;
|
||
public JRadioButton var_javax_swing_JRadioButton_b;
|
||
public static final String var_java_lang_String_a = "columnName";
|
||
public static final String var_java_lang_String_b = "javaPropertyName";
|
||
public static final String c = "javaType";
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public a(List<g_0> list, @Nullable Project project, boolean bl, PsiClass psiClass) {
|
||
super(project, bl, DialogWrapper.IdeModalityType.MODELESS);
|
||
this.var_java_util_List_com_ccnode_codegenerator_ad_g_0__a = list;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.b();
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
buttonGroup.add(this.var_javax_swing_JRadioButton_a);
|
||
buttonGroup.add(this.var_javax_swing_JRadioButton_b);
|
||
this.var_javax_swing_JRadioButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = a.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
a.this.var_javax_swing_JTable_a.setValueAt(a.this.var_javax_swing_JTable_a.getValueAt(i2, 0), i2, 1);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JRadioButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = a.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string = n.j((String)a.this.var_javax_swing_JTable_a.getValueAt(i2, 0));
|
||
a.this.var_javax_swing_JTable_a.setValueAt(string, i2, 1);
|
||
}
|
||
}
|
||
});
|
||
this.setTitle("Add field to result type");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
Object[] objectArray = new String[]{var_java_lang_String_a, var_java_lang_String_b, c};
|
||
ArrayList<Object[]> arrayList = new ArrayList<Object[]>();
|
||
for (int i2 = 0; i2 < this.var_java_util_List_com_ccnode_codegenerator_ad_g_0__a.size(); ++i2) {
|
||
Object[] objectArray2 = new Object[4];
|
||
g_0 g_02 = this.var_java_util_List_com_ccnode_codegenerator_ad_g_0__a.get(i2);
|
||
objectArray2[0] = g_02.f();
|
||
objectArray2[1] = n.j(g_02.f());
|
||
objectArray2[2] = g_02.c();
|
||
objectArray2[3] = g_02.e();
|
||
arrayList.add(objectArray2);
|
||
}
|
||
Object[][] objectArray3 = new Object[arrayList.size()][];
|
||
arrayList.toArray((T[])objectArray3);
|
||
this.var_javax_swing_JTable_a = new JTable(objectArray3, objectArray);
|
||
this.var_javax_swing_JTable_a.setRowHeight(25);
|
||
this.var_javax_swing_JTable_a.getColumn(c).setCellEditor(new b(this.var_com_intellij_openapi_project_Project_a, new ArrayList<String>(f.var_java_util_Set_java_lang_String__a)));
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (int i2 = 0; i2 < this.var_javax_swing_JTable_a.getRowCount(); ++i2) {
|
||
String string = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 0);
|
||
String string2 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string3 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 2);
|
||
PsiField psiField = JavaPsiFacade.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getElementFactory().createFieldFromText("private " + string3 + " " + string2 + ";", (PsiElement)this.var_com_intellij_psi_PsiClass_a);
|
||
arrayList.add(psiField);
|
||
}
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, (Runnable)new Runnable(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_n_d_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_n_d_a_a = a2;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
PsiField psiField2;
|
||
for (PsiField psiField2 : this.var_java_util_List_a) {
|
||
this.var_com_ccnode_codegenerator_n_d_a_a.var_com_intellij_psi_PsiClass_a.add((PsiElement)psiField2);
|
||
}
|
||
PsiElement psiElement = JavaCodeStyleManager.getInstance((Project)this.var_com_ccnode_codegenerator_n_d_a_a.var_com_intellij_openapi_project_Project_a).shortenClassReferences((PsiElement)this.var_com_ccnode_codegenerator_n_d_a_a.var_com_intellij_psi_PsiClass_a);
|
||
psiField2 = CodeStyleManager.getInstance((Project)this.var_com_ccnode_codegenerator_n_d_a_a.var_com_intellij_openapi_project_Project_a).reformat((PsiElement)this.var_com_ccnode_codegenerator_n_d_a_a.var_com_intellij_psi_PsiClass_a);
|
||
CodeInsightUtil.positionCursor((Project)this.var_com_ccnode_codegenerator_n_d_a_a.var_com_intellij_openapi_project_Project_a, (PsiFile)psiField2.getContainingFile(), (PsiElement)psiField2);
|
||
}
|
||
});
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
this.var_javax_swing_JPanel_a.add((Component)jScrollPane, new GridConstraints(1, 0, 1, 2, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTable_a);
|
||
this.var_javax_swing_JRadioButton_a = new JRadioButton();
|
||
this.var_javax_swing_JRadioButton_a.setSelected(true);
|
||
this.a(this.var_javax_swing_JRadioButton_a, this.a("i18n/i18n", "default"));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JRadioButton_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_b = new JRadioButton();
|
||
this.a(this.var_javax_swing_JRadioButton_b, this.a("i18n/i18n", "use.actual.column.name"));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JRadioButton_b, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.n.i;
|
||
import com.ccnode.codegenerator.n.j;
|
||
import com.ccnode.codegenerator.n.k;
|
||
import com.ccnode.codegenerator.n.n;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.List;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class f
|
||
extends DialogWrapper {
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private i var_com_ccnode_codegenerator_n_i_a = i.var_com_ccnode_codegenerator_n_i_a;
|
||
private n var_com_ccnode_codegenerator_n_n_a;
|
||
private List<PsiField> var_java_util_List_com_intellij_psi_PsiField__a;
|
||
|
||
public f(Project project, PsiClass psiClass, List<PsiField> list) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.var_com_intellij_psi_PsiClass_a = list;
|
||
this.setTitle("choose what you wan't to do");
|
||
this.setOKButtonText("next");
|
||
this.init();
|
||
}
|
||
|
||
public i com_ccnode_codegenerator_n_i_a() {
|
||
return this.var_com_ccnode_codegenerator_n_i_a;
|
||
}
|
||
|
||
public void a(i i2) {
|
||
this.var_com_ccnode_codegenerator_n_i_a = i2;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
if (this.var_com_ccnode_codegenerator_n_i_a == i.var_com_ccnode_codegenerator_n_i_a) {
|
||
k k2 = new k(this.var_com_intellij_openapi_project_Project_a, this.var_com_intellij_psi_PsiClass_a, (List<PsiField>)this.var_com_intellij_psi_PsiClass_a);
|
||
boolean bl = k2.showAndGet();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
this.var_com_ccnode_codegenerator_n_n_a = k2.com_ccnode_codegenerator_n_n_a();
|
||
super.doOKAction();
|
||
} else if (this.var_com_ccnode_codegenerator_n_i_a == i.b) {
|
||
j j2 = new j(this.var_com_intellij_openapi_project_Project_a, this.var_com_intellij_psi_PsiClass_a, (List<PsiField>)this.var_com_intellij_psi_PsiClass_a);
|
||
boolean bl = j2.showAndGet();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
}
|
||
|
||
public n com_ccnode_codegenerator_n_n_a() {
|
||
return this.var_com_ccnode_codegenerator_n_n_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
JRadioButton jRadioButton = new JRadioButton("Generate create table sql", true);
|
||
jRadioButton.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
f.this.var_com_ccnode_codegenerator_n_i_a = i.var_com_ccnode_codegenerator_n_i_a;
|
||
}
|
||
});
|
||
buttonGroup.add(jRadioButton);
|
||
jPanel.add((Component)jRadioButton, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JRadioButton jRadioButton2 = new JRadioButton("Update existing mybatis file (not recommend)");
|
||
buttonGroup.add(jRadioButton2);
|
||
jRadioButton2.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
f.this.var_com_ccnode_codegenerator_n_i_a = i.b;
|
||
}
|
||
});
|
||
jPanel.add((Component)jRadioButton2, gridBagConstraints);
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.n.a.a;
|
||
import com.ccnode.codegenerator.n.a.b;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
public class g {
|
||
static Map<String, List<b>> a(List<a> list, String string) {
|
||
HashMap<String, List<b>> hashMap = new HashMap<String, List<b>>();
|
||
for (a a2 : list) {
|
||
hashMap.put(a2.b(), com.ccnode.codegenerator.l.b.a(string).com_ccnode_codegenerator_l_a_e_a().a(a2.com_intellij_psi_PsiField_a()));
|
||
}
|
||
return hashMap;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
public class h {
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private Boolean var_java_lang_Boolean_b;
|
||
private String var_java_lang_String_c;
|
||
private String var_java_lang_String_d;
|
||
private String var_java_lang_String_e;
|
||
private Boolean var_java_lang_Boolean_c;
|
||
private String f;
|
||
private Boolean var_java_lang_Boolean_d;
|
||
private Boolean var_java_lang_Boolean_e;
|
||
private String g;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.f;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.f = string;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_d;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_d = bl;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_b() {
|
||
return this.var_java_lang_Boolean_e;
|
||
}
|
||
|
||
public void b(Boolean bl) {
|
||
this.var_java_lang_Boolean_e = bl;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.g;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.g = string;
|
||
}
|
||
|
||
public String java_lang_String_c() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_c() {
|
||
return this.var_java_lang_Boolean_c;
|
||
}
|
||
|
||
public void c(Boolean bl) {
|
||
this.var_java_lang_Boolean_c = bl;
|
||
}
|
||
|
||
public String java_lang_String_d() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_d() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void d(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_e() {
|
||
return this.var_java_lang_Boolean_b;
|
||
}
|
||
|
||
public void e(Boolean bl) {
|
||
this.var_java_lang_Boolean_b = bl;
|
||
}
|
||
|
||
public String java_lang_String_e() {
|
||
return this.var_java_lang_String_c;
|
||
}
|
||
|
||
public void e(String string) {
|
||
this.var_java_lang_String_c = string;
|
||
}
|
||
|
||
public String f() {
|
||
return this.var_java_lang_String_d;
|
||
}
|
||
|
||
public void f(String string) {
|
||
this.var_java_lang_String_d = string;
|
||
}
|
||
|
||
public String g() {
|
||
return this.var_java_lang_String_e;
|
||
}
|
||
|
||
public void g(String string) {
|
||
this.var_java_lang_String_e = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
public final class i
|
||
extends Enum<i> {
|
||
public static final /* enum */ i var_com_ccnode_codegenerator_n_i_a;
|
||
public static final /* enum */ i b;
|
||
private static final /* synthetic */ i[] var_com_ccnode_codegenerator_n_i_arr_a;
|
||
|
||
public static i[] a() {
|
||
return (i[])var_com_ccnode_codegenerator_n_i_arr_a.clone();
|
||
}
|
||
|
||
public static i a(String string) {
|
||
return Enum.valueOf(i.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ i[] b() {
|
||
return new i[]{var_com_ccnode_codegenerator_n_i_a, b};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_n_i_a = new i();
|
||
b = new i();
|
||
var_com_ccnode_codegenerator_n_i_arr_a = i.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.fileChooser.FileChooser
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptor
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.module.ModuleUtilCore
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiManager
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.search.PsiSearchHelper
|
||
* com.intellij.psi.search.PsiShortNamesCache
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.Consumer
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.ad.ac;
|
||
import com.ccnode.codegenerator.n.z;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.fileChooser.FileChooser;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.module.ModuleUtilCore;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiManager;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.search.PsiSearchHelper;
|
||
import com.intellij.psi.search.PsiShortNamesCache;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.Consumer;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class j
|
||
extends DialogWrapper {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private XmlFile var_com_intellij_psi_xml_XmlFile_a;
|
||
private PsiClass b;
|
||
private List<PsiField> var_java_util_List_com_intellij_psi_PsiField__a;
|
||
|
||
public j(Project project, PsiClass psiClass, List<PsiField> list) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
this.var_javax_swing_JTextField_a.setEditable(false);
|
||
this.var_com_intellij_openapi_project_Project_a = list;
|
||
this.void_a();
|
||
this.setTitle("generate update for your mapper xml");
|
||
this.setOKButtonText("next");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
PsiSearchHelper psiSearchHelper = (PsiSearchHelper)ServiceManager.getService((Project)this.var_com_intellij_openapi_project_Project_a, PsiSearchHelper.class);
|
||
ArrayList arrayList = new ArrayList();
|
||
Module module = ModuleUtilCore.findModuleForPsiElement((PsiElement)this.var_com_intellij_psi_PsiClass_a);
|
||
if (module == null) {
|
||
return;
|
||
}
|
||
psiSearchHelper.processUsagesInNonJavaFiles(this.var_com_intellij_psi_PsiClass_a.getName(), (psiFile, n2, n3) -> {
|
||
XmlFile xmlFile;
|
||
if (psiFile instanceof XmlFile && (xmlFile = (XmlFile)psiFile).getRootTag() != null && "mapper".equals(xmlFile.getRootTag().getName()) && xmlFile.getText().contains(this.var_com_intellij_psi_PsiClass_a.getQualifiedName())) {
|
||
arrayList.add(xmlFile);
|
||
return false;
|
||
}
|
||
return true;
|
||
}, GlobalSearchScope.projectScope((Project)this.var_com_intellij_openapi_project_Project_a));
|
||
if (arrayList.size() > 0) {
|
||
this.var_javax_swing_JTextField_a.setText(((XmlFile)arrayList.get(0)).getVirtualFile().getPath());
|
||
this.var_com_intellij_psi_xml_XmlFile_a = (XmlFile)arrayList.get(0);
|
||
}
|
||
}
|
||
|
||
protected boolean postponeValidation() {
|
||
return super.postponeValidation();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
boolean bl = this.boolean_a();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
z z2 = new z(this.var_com_intellij_openapi_project_Project_a, this.var_com_intellij_psi_PsiClass_a, this.var_com_intellij_psi_xml_XmlFile_a, this.b, (List<PsiField>)this.var_com_intellij_openapi_project_Project_a);
|
||
boolean bl2 = z2.showAndGet();
|
||
if (!bl2) {
|
||
return;
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
|
||
private boolean boolean_a() {
|
||
PsiClass[] psiClassArray;
|
||
if (this.var_com_intellij_psi_xml_XmlFile_a == null) {
|
||
Messages.showErrorDialog((String)"the file is empty", (String)"validate fail");
|
||
return false;
|
||
}
|
||
if (!this.var_com_intellij_psi_xml_XmlFile_a.getText().contains("mapper")) {
|
||
Messages.showErrorDialog((String)"the file choosed is not valid mapper for mybatis", (String)"validate fail");
|
||
return false;
|
||
}
|
||
if (!this.var_com_intellij_psi_xml_XmlFile_a.getText().contains(this.var_com_intellij_psi_PsiClass_a.getQualifiedName())) {
|
||
Messages.showErrorDialog((String)("the file do not contain " + this.var_com_intellij_psi_PsiClass_a.getQualifiedName() + " as result Map"), (String)"validate fail");
|
||
return false;
|
||
}
|
||
XmlTag xmlTag = this.var_com_intellij_psi_xml_XmlFile_a.getRootTag();
|
||
if (xmlTag == null) {
|
||
Messages.showErrorDialog((String)"the xml file root tag is empty", (String)"validate fail");
|
||
return false;
|
||
}
|
||
XmlAttribute xmlAttribute = xmlTag.getAttribute("namespace");
|
||
if (xmlAttribute == null) {
|
||
Messages.showErrorDialog((String)"the xml file namespaceAttribute is empty", (String)"validate fail");
|
||
return false;
|
||
}
|
||
String string = xmlAttribute.getValue();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
Messages.showErrorDialog((String)"the xml file namespace is empty", (String)"validate fail");
|
||
return false;
|
||
}
|
||
boolean bl = false;
|
||
String string2 = string.trim();
|
||
String[] stringArray = string2.split("\\.");
|
||
if (stringArray.length > 0 && (psiClassArray = PsiShortNamesCache.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getClassesByName(stringArray[stringArray.length - 1], ac.a.b((PsiElement)this.var_com_intellij_psi_PsiClass_a))).length > 0) {
|
||
for (PsiClass psiClass : psiClassArray) {
|
||
if (!psiClass.getQualifiedName().equals(string2)) continue;
|
||
bl = true;
|
||
this.b = psiClass;
|
||
break;
|
||
}
|
||
}
|
||
if (!bl) {
|
||
Messages.showErrorDialog((String)"can't find the xml name space class", (String)"validate fail");
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel();
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
jPanel.setLayout(new GridBagLayout());
|
||
JLabel jLabel = new JLabel("choose your old mapper xml location:");
|
||
gridBagConstraints.anchor = 18;
|
||
gridBagConstraints.fill = 1;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
jPanel.add((Component)jLabel, gridBagConstraints);
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 1;
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JButton jButton = new JButton("open folder");
|
||
jButton.addActionListener(actionEvent -> {
|
||
this.getOKAction().setEnabled(true);
|
||
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor((String)"xml");
|
||
fileChooserDescriptor.setShowFileSystemRoots(true);
|
||
fileChooserDescriptor.setTitle("Choose a file...");
|
||
fileChooserDescriptor.setHideIgnored(false);
|
||
FileChooser.chooseFiles((FileChooserDescriptor)fileChooserDescriptor, (Project)this.var_com_intellij_openapi_project_Project_a, (VirtualFile)this.var_com_intellij_openapi_project_Project_a.getBaseDir(), (Consumer)new Consumer<List<VirtualFile>>(){
|
||
|
||
public void a(List<VirtualFile> list) {
|
||
j.this.var_javax_swing_JTextField_a.setText(list.get(0).getPath());
|
||
PsiFile psiFile = PsiManager.getInstance((Project)j.this.var_com_intellij_openapi_project_Project_a).findFile(list.get(0));
|
||
if (psiFile != null && psiFile instanceof XmlFile) {
|
||
j.this.var_com_intellij_psi_xml_XmlFile_a = (XmlFile)psiFile;
|
||
}
|
||
}
|
||
|
||
public /* synthetic */ void consume(Object object) {
|
||
this.a((List)object);
|
||
}
|
||
});
|
||
});
|
||
jPanel.add((Component)jButton, gridBagConstraints);
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
*/
|
||
package com.ccnode.codegenerator.n.e;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import java.awt.Component;
|
||
import java.util.List;
|
||
import javax.swing.AbstractCellEditor;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellEditor;
|
||
|
||
public class b
|
||
extends AbstractCellEditor
|
||
implements TableCellEditor {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
|
||
public b(Project project, List<String> list) {
|
||
TextFieldWithAutoCompletion textFieldWithAutoCompletion;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
List<String> list2 = list;
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = textFieldWithAutoCompletion = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, list2, (boolean)true, (String)"");
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellEditorComponent(JTable jTable, Object object, boolean bl, int n2, int n3) {
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText((String)object);
|
||
return this.var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
}
|
||
|
||
@Override
|
||
public Object getCellEditorValue() {
|
||
return this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n.e;
|
||
|
||
import com.ccnode.codegenerator.ad.g_0;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.l.f;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.n.e.a;
|
||
import com.ccnode.codegenerator.n.e.b;
|
||
import com.ccnode.codegenerator.n.e.d;
|
||
import com.ccnode.codegenerator.n.e.e;
|
||
import com.ccnode.codegenerator.w.b_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends DialogWrapper {
|
||
public static final String var_java_lang_String_a = "columnName";
|
||
public static final String var_java_lang_String_b = "javaPropertyName";
|
||
public static final String var_java_lang_String_c = "javaType";
|
||
public static final String var_java_lang_String_d = "comment";
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JRadioButton var_javax_swing_JRadioButton_a;
|
||
private JRadioButton var_javax_swing_JRadioButton_b;
|
||
private JTable var_javax_swing_JTable_a;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private com.ccnode.codegenerator.ab.a var_com_ccnode_codegenerator_ab_a_a;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private JCheckBox var_javax_swing_JCheckBox_a;
|
||
private JCheckBox var_javax_swing_JCheckBox_b;
|
||
private JPanel var_javax_swing_JPanel_d;
|
||
private JCheckBox var_javax_swing_JCheckBox_c;
|
||
private JCheckBox var_javax_swing_JCheckBox_d;
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_n_e_a__a;
|
||
private List<g_0> var_java_util_List_com_ccnode_codegenerator_ad_g_0__b;
|
||
private boolean var_boolean_a;
|
||
private e var_com_ccnode_codegenerator_n_e_e_a;
|
||
private List<String> var_java_util_List_java_lang_String__c;
|
||
private d var_com_ccnode_codegenerator_n_e_d_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public c(List<g_0> list, String string, boolean bl, String string2, String string3, Project project, e e2) {
|
||
super(project, true);
|
||
this.var_java_lang_String_a = Lists.newArrayList();
|
||
this.var_java_lang_String_c = Lists.newArrayList();
|
||
this.var_com_ccnode_codegenerator_n_e_d_a = new d();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_b = list;
|
||
this.var_boolean_a = bl;
|
||
this.var_com_ccnode_codegenerator_n_e_e_a = e2;
|
||
this.b();
|
||
this.var_javax_swing_JTextField_a.setText(string3);
|
||
if (this.var_boolean_a) {
|
||
this.var_javax_swing_JTextField_b.setText(string2);
|
||
} else {
|
||
this.var_javax_swing_JPanel_b.remove(this.var_javax_swing_JPanel_c);
|
||
}
|
||
this.var_javax_swing_JRadioButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = c.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
c.this.var_javax_swing_JTable_a.setValueAt(c.this.var_javax_swing_JTable_a.getValueAt(i2, 0), i2, 1);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JRadioButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = c.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string = n.j((String)c.this.var_javax_swing_JTable_a.getValueAt(i2, 0));
|
||
c.this.var_javax_swing_JTable_a.setValueAt(string, i2, 1);
|
||
}
|
||
}
|
||
});
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/generateByTemplate");
|
||
}
|
||
}, null);
|
||
if (this.var_boolean_a) {
|
||
this.var_javax_swing_JPanel_a.setVisible(false);
|
||
this.setTitle("extract java class and resultMap");
|
||
} else {
|
||
this.setTitle("extract java class");
|
||
}
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
Object object;
|
||
Object[] objectArray = new String[]{var_java_lang_String_a, var_java_lang_String_b, var_java_lang_String_c, var_java_lang_String_d};
|
||
ArrayList<Object[]> arrayList = new ArrayList<Object[]>();
|
||
for (int i2 = 0; i2 < this.var_java_lang_String_b.size(); ++i2) {
|
||
object = new Object[4];
|
||
g_0 g_02 = (g_0)this.var_java_lang_String_b.get(i2);
|
||
object[0] = g_02.f();
|
||
object[1] = n.j(g_02.f());
|
||
object[2] = g_02.c();
|
||
object[3] = g_02.e();
|
||
arrayList.add((Object[])object);
|
||
}
|
||
Object[][] objectArray2 = new Object[arrayList.size()][];
|
||
arrayList.toArray((T[])objectArray2);
|
||
this.var_javax_swing_JTable_a = new JTable(objectArray2, objectArray);
|
||
this.var_javax_swing_JTable_a.setRowHeight(25);
|
||
this.var_javax_swing_JTable_a.getColumn(var_java_lang_String_c).setCellEditor(new b(this.var_com_intellij_openapi_project_Project_a, new ArrayList<String>(f.var_java_util_Set_java_lang_String__a)));
|
||
object = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_ab_a_a = new com.ccnode.codegenerator.ab.a(this.var_com_intellij_openapi_project_Project_a, ((ProjectProfile)object).getGeneratedClassPathList());
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
buttonGroup.add(this.var_javax_swing_JRadioButton_a);
|
||
buttonGroup.add(this.var_javax_swing_JRadioButton_b);
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
int n2 = this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
a a2 = new a();
|
||
a2.a((String)this.var_javax_swing_JTable_a.getValueAt(i2, 0));
|
||
a2.b((String)this.var_javax_swing_JTable_a.getValueAt(i2, 1));
|
||
a2.c((String)this.var_javax_swing_JTable_a.getValueAt(i2, 2));
|
||
String string = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 3);
|
||
a2.d(string);
|
||
this.var_java_lang_String_a.add(a2);
|
||
}
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.a((List<a>)((Object)this.var_java_lang_String_a));
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.a(this.var_javax_swing_JCheckBox_b.isSelected());
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.c(this.var_javax_swing_JCheckBox_d.isSelected());
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.d(this.var_javax_swing_JCheckBox_c.isSelected());
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.b(this.var_boolean_a);
|
||
if (this.var_boolean_a) {
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.a(this.var_javax_swing_JTextField_b.getText());
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.a(this.var_com_ccnode_codegenerator_n_e_e_a);
|
||
}
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.b(this.var_javax_swing_JTextField_a.getText());
|
||
this.var_com_ccnode_codegenerator_n_e_d_a.c(this.var_com_ccnode_codegenerator_ab_a_a.a());
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, (Runnable)new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
b_0.a.a(c.this.var_com_intellij_openapi_project_Project_a, c.this.var_com_ccnode_codegenerator_n_e_d_a);
|
||
ProjectProfile projectProfile = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(c.this.var_com_intellij_openapi_project_Project_a);
|
||
projectProfile.getGeneratedClassPathList().removeIf(string -> string == null || string.equals(c.this.var_com_ccnode_codegenerator_n_e_d_a.java_lang_String_c()));
|
||
if (!projectProfile.getGeneratedClassPathList().contains(c.this.var_com_ccnode_codegenerator_n_e_d_a.java_lang_String_c())) {
|
||
projectProfile.getGeneratedClassPathList().add(c.this.var_com_ccnode_codegenerator_n_e_d_a.java_lang_String_c());
|
||
}
|
||
}
|
||
});
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
if (StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextField_a.getText())) {
|
||
return new ValidationInfo("java class name is empty!", (JComponent)this.var_javax_swing_JTextField_a);
|
||
}
|
||
if (this.var_boolean_a && StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextField_b.getText())) {
|
||
return new ValidationInfo("result map is empty!", (JComponent)this.var_javax_swing_JTextField_b);
|
||
}
|
||
if (StringUtils.isBlank((CharSequence)this.var_com_ccnode_codegenerator_ab_a_a.a())) {
|
||
return new ValidationInfo("java class path is empty!", (JComponent)((Object)this.var_com_ccnode_codegenerator_ab_a_a));
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public List<a> a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public d com_ccnode_codegenerator_n_e_d_a() {
|
||
return this.var_com_ccnode_codegenerator_n_e_d_a;
|
||
}
|
||
|
||
public void a(d d2) {
|
||
this.var_com_ccnode_codegenerator_n_e_d_a = d2;
|
||
}
|
||
|
||
public e com_ccnode_codegenerator_n_e_e_a() {
|
||
return this.var_com_ccnode_codegenerator_n_e_e_a;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(7, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "java.class.name"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JPanel_c, new GridConstraints(3, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "result.map.name"));
|
||
this.var_javax_swing_JPanel_c.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
this.var_javax_swing_JPanel_c.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel2, new GridConstraints(5, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_a = new JRadioButton();
|
||
this.var_javax_swing_JRadioButton_a.setSelected(true);
|
||
this.a(this.var_javax_swing_JRadioButton_a, this.a("i18n/i18n", "default"));
|
||
jPanel2.add((Component)this.var_javax_swing_JRadioButton_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_b = new JRadioButton();
|
||
this.a(this.var_javax_swing_JRadioButton_b, this.a("i18n/i18n", "use.actual.column.name"));
|
||
jPanel2.add((Component)this.var_javax_swing_JRadioButton_b, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel3, new GridConstraints(2, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "java.class.path"));
|
||
jPanel3.add((Component)jLabel3, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel3.add((Component)((Object)this.var_com_ccnode_codegenerator_ab_a_a), new GridConstraints(0, 1, 1, 1, 0, 1, 3, 3, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
this.var_javax_swing_JPanel_b.add((Component)jScrollPane, new GridConstraints(6, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTable_a);
|
||
this.var_javax_swing_JPanel_d = new JPanel();
|
||
this.var_javax_swing_JPanel_d.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JPanel_d, new GridConstraints(4, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_a.setSelected(true);
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", var_java_lang_String_d));
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_b = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_b, this.a("i18n/i18n", "swagger"));
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JCheckBox_b, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_c = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_c, this.a("i18n/i18n", "lombok"));
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JCheckBox_c, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_d = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_d, this.a("i18n/i18n", "serializable1"));
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JCheckBox_d, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_a, this.a("i18n/i18n", "morecustomize"));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n.e;
|
||
|
||
import com.ccnode.codegenerator.n.e.a;
|
||
import com.ccnode.codegenerator.n.e.e;
|
||
import java.util.List;
|
||
|
||
public class d {
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_n_e_a__a;
|
||
private boolean var_boolean_a;
|
||
private boolean var_boolean_b;
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private String var_java_lang_String_c;
|
||
private String var_java_lang_String_d;
|
||
private e var_com_ccnode_codegenerator_n_e_e_a;
|
||
private boolean var_boolean_c;
|
||
private boolean var_boolean_d;
|
||
|
||
public List<a> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_n_e_a__a;
|
||
}
|
||
|
||
public void a(List<a> list) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_n_e_a__a = list;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public boolean boolean_b() {
|
||
return this.var_boolean_b;
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.var_boolean_b = bl;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public String java_lang_String_c() {
|
||
return this.var_java_lang_String_c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.var_java_lang_String_c = string;
|
||
}
|
||
|
||
public String java_lang_String_d() {
|
||
return this.var_java_lang_String_d;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.var_java_lang_String_d = string;
|
||
}
|
||
|
||
public void a(e e2) {
|
||
this.var_com_ccnode_codegenerator_n_e_e_a = e2;
|
||
}
|
||
|
||
public e com_ccnode_codegenerator_n_e_e_a() {
|
||
return this.var_com_ccnode_codegenerator_n_e_e_a;
|
||
}
|
||
|
||
public void c(boolean bl) {
|
||
this.var_boolean_c = bl;
|
||
}
|
||
|
||
public boolean boolean_c() {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public void d(boolean bl) {
|
||
this.var_boolean_d = bl;
|
||
}
|
||
|
||
public boolean boolean_d() {
|
||
return this.var_boolean_d;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
*/
|
||
package com.ccnode.codegenerator.n.e;
|
||
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
|
||
public class e {
|
||
private XmlFile var_com_intellij_psi_xml_XmlFile_a;
|
||
private XmlTag var_com_intellij_psi_xml_XmlTag_a;
|
||
|
||
public XmlFile com_intellij_psi_xml_XmlFile_a() {
|
||
return this.var_com_intellij_psi_xml_XmlFile_a;
|
||
}
|
||
|
||
public void a(XmlFile xmlFile) {
|
||
this.var_com_intellij_psi_xml_XmlFile_a = xmlFile;
|
||
}
|
||
|
||
public XmlTag com_intellij_psi_xml_XmlTag_a() {
|
||
return this.var_com_intellij_psi_xml_XmlTag_a;
|
||
}
|
||
|
||
public void a(XmlTag xmlTag) {
|
||
this.var_com_intellij_psi_xml_XmlTag_a = xmlTag;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ide.util.TreeClassChooser
|
||
* com.intellij.ide.util.TreeClassChooserFactory
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaCodeFragment$VisibilityChecker
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.ui.EditorComboBox
|
||
* com.intellij.ui.ReferenceEditorComboWithBrowseButton
|
||
*/
|
||
package com.ccnode.codegenerator.n.e;
|
||
|
||
import com.intellij.ide.util.TreeClassChooser;
|
||
import com.intellij.ide.util.TreeClassChooserFactory;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaCodeFragment;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.ui.EditorComboBox;
|
||
import com.intellij.ui.ReferenceEditorComboWithBrowseButton;
|
||
import java.awt.Component;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import javax.swing.AbstractCellEditor;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellEditor;
|
||
|
||
public class f
|
||
extends AbstractCellEditor
|
||
implements TableCellEditor {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private ReferenceEditorComboWithBrowseButton var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a;
|
||
|
||
public f(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellEditorComponent(JTable jTable, Object object, boolean bl, int n2, int n3) {
|
||
ReferenceEditorComboWithBrowseButton referenceEditorComboWithBrowseButton;
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a = referenceEditorComboWithBrowseButton = new ReferenceEditorComboWithBrowseButton((ActionListener)new a(this, true), null, this.var_com_intellij_openapi_project_Project_a, true, JavaCodeFragment.VisibilityChecker.EVERYTHING_VISIBLE, "mybatis_customized field recent key");
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.setText((String)object);
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.appendItem((String)object);
|
||
((EditorComboBox)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getChildComponent()).setSelectedItem((Object)((String)object));
|
||
return this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a;
|
||
}
|
||
|
||
@Override
|
||
public Object getCellEditorValue() {
|
||
return this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getText();
|
||
}
|
||
|
||
private class a
|
||
implements ActionListener {
|
||
private boolean var_boolean_a;
|
||
final /* synthetic */ f var_com_ccnode_codegenerator_n_e_f_a;
|
||
|
||
public a(f f2, boolean bl) {
|
||
this.var_com_ccnode_codegenerator_n_e_f_a = f2;
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
TreeClassChooserFactory treeClassChooserFactory = TreeClassChooserFactory.getInstance((Project)this.var_com_ccnode_codegenerator_n_e_f_a.var_com_intellij_openapi_project_Project_a);
|
||
TreeClassChooser treeClassChooser = treeClassChooserFactory.createAllProjectScopeChooser("choose class");
|
||
treeClassChooser.showDialog();
|
||
PsiClass psiClass = treeClassChooser.getSelected();
|
||
if (psiClass != null) {
|
||
String string = psiClass.getQualifiedName();
|
||
if (this.var_boolean_a) {
|
||
this.var_com_ccnode_codegenerator_n_e_f_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.appendItem(string);
|
||
((EditorComboBox)this.var_com_ccnode_codegenerator_n_e_f_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getChildComponent()).setSelectedItem((Object)string);
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_n_e_f_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.appendItem(string);
|
||
((EditorComboBox)this.var_com_ccnode_codegenerator_n_e_f_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getChildComponent()).setSelectedItem((Object)string);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
*/
|
||
package com.ccnode.codegenerator.n.e;
|
||
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import java.awt.Component;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellRenderer;
|
||
|
||
public class g
|
||
implements TableCellRenderer {
|
||
private TextFieldWithAutoCompletion a;
|
||
|
||
public g(TextFieldWithAutoCompletion textFieldWithAutoCompletion) {
|
||
this.a = textFieldWithAutoCompletion;
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellRendererComponent(JTable jTable, Object object, boolean bl, boolean bl2, int n2, int n3) {
|
||
this.a.setText((String)object);
|
||
return this.a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Maps
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.ui.components.JBScrollPane
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.n.y;
|
||
import com.ccnode.codegenerator.q.e_0;
|
||
import com.google.common.collect.Maps;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.ui.components.JBScrollPane;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.ArrayList;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class l
|
||
extends DialogWrapper {
|
||
private List<String> var_java_util_List_java_lang_String__a = Maps.newHashMap();
|
||
private List<y> b;
|
||
private String var_java_lang_String_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private e_0 var_com_ccnode_codegenerator_q_e_0_a;
|
||
private Map<String, String> var_java_util_Map_java_lang_String,_java_lang_String__a;
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
|
||
public l(Project project, List<String> list, PsiClass psiClass) {
|
||
super(project, true);
|
||
this.var_java_util_List_java_lang_String__a = list;
|
||
this.var_java_lang_String_a = psiClass.getQualifiedName();
|
||
this.b = new ArrayList<y>();
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
for (String string : list) {
|
||
String string2 = this.a(psiClass, string);
|
||
if (string2 == null) continue;
|
||
this.var_java_util_List_java_lang_String__a.put(string, string2);
|
||
}
|
||
this.setTitle("generate the resultMap for type:" + this.var_java_lang_String_a);
|
||
this.void_a();
|
||
this.init();
|
||
}
|
||
|
||
public e_0 com_ccnode_codegenerator_q_e_0_a() {
|
||
return this.var_com_ccnode_codegenerator_q_e_0_a;
|
||
}
|
||
|
||
public void a(e_0 e_02) {
|
||
this.var_com_ccnode_codegenerator_q_e_0_a = e_02;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
LinkedHashMap<String, String> linkedHashMap = new LinkedHashMap<String, String>();
|
||
LinkedHashMap<String, String> linkedHashMap2 = new LinkedHashMap<String, String>();
|
||
if (StringUtils.isBlank((String)this.var_javax_swing_JTextField_a.getText())) {
|
||
Messages.showErrorDialog((String)"resultMapId is empty, please write things to it", (String)"resultMapId is empty");
|
||
return;
|
||
}
|
||
for (y y2 : this.b) {
|
||
if (StringUtils.isNotBlank((String)y2.javax_swing_JTextField_a().getText())) {
|
||
linkedHashMap.put(y2.java_lang_String_a(), y2.javax_swing_JTextField_a().getText().trim());
|
||
linkedHashMap2.put(y2.java_lang_String_a().toLowerCase(), y2.javax_swing_JTextField_a().getText().trim());
|
||
continue;
|
||
}
|
||
Messages.showErrorDialog((String)("please write text to " + y2.java_lang_String_a()), (String)"column is empty");
|
||
return;
|
||
}
|
||
this.var_com_ccnode_codegenerator_q_e_0_a.void_a(this.var_javax_swing_JTextField_a.getText());
|
||
this.var_com_ccnode_codegenerator_q_e_0_a.a(linkedHashMap2);
|
||
this.var_com_ccnode_codegenerator_q_e_0_a.b(linkedHashMap);
|
||
super.doOKAction();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_com_ccnode_codegenerator_q_e_0_a = new e_0();
|
||
LinkedHashMap<String, String> linkedHashMap = new LinkedHashMap<String, String>();
|
||
for (String string : this.var_java_util_List_java_lang_String__a) {
|
||
linkedHashMap.put(string, string);
|
||
}
|
||
this.var_com_ccnode_codegenerator_q_e_0_a.a(linkedHashMap);
|
||
this.var_com_ccnode_codegenerator_q_e_0_a.void_a("BaseResultMap");
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.anchor = 17;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
|
||
gridBagConstraints.gridwidth = 5;
|
||
JLabel jLabel = new JLabel("<html>can't find right resultMap for type:" + this.var_java_lang_String_a + " let generate new resultMap for it,<br>if you have @Column or @TableField annotation on field,we will use it first</html>");
|
||
jLabel.setForeground(Color.RED);
|
||
jLabel.setOpaque(true);
|
||
jPanel.add((Component)jLabel, gridBagConstraints);
|
||
gridBagConstraints.gridwidth = 1;
|
||
gridBagConstraints.gridy = 1;
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
JRadioButton jRadioButton = new JRadioButton("raw", false);
|
||
jPanel.add((Component)jRadioButton, gridBagConstraints);
|
||
buttonGroup.add(jRadioButton);
|
||
gridBagConstraints.gridx = 2;
|
||
JRadioButton jRadioButton2 = new JRadioButton("snake", true);
|
||
jPanel.add((Component)jRadioButton2, gridBagConstraints);
|
||
buttonGroup.add(jRadioButton2);
|
||
gridBagConstraints.gridx = 3;
|
||
JRadioButton jRadioButton3 = new JRadioButton("lowercase");
|
||
jPanel.add((Component)jRadioButton3, gridBagConstraints);
|
||
buttonGroup.add(jRadioButton3);
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
jPanel.add((Component)new JLabel("resultMapId"), gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
this.var_javax_swing_JTextField_a = new JTextField("BaseResultMap");
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, gridBagConstraints);
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
jPanel.add((Component)new JLabel("property"), gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
jPanel.add((Component)new JLabel("column"), gridBagConstraints);
|
||
for (String string : this.var_java_util_List_java_lang_String__a) {
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
JLabel jLabel2 = new JLabel(string);
|
||
jPanel.add((Component)jLabel2, gridBagConstraints);
|
||
String string2 = (String)this.var_java_util_List_java_lang_String__a.get(string);
|
||
JTextField jTextField = new JTextField(string2 == null ? n.e(string) : string2);
|
||
y y2 = new y();
|
||
y2.a(string);
|
||
y2.a(jTextField);
|
||
this.b.add(y2);
|
||
gridBagConstraints.gridx = 1;
|
||
jPanel.add((Component)jTextField, gridBagConstraints);
|
||
}
|
||
jRadioButton.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
for (y y2 : l.this.b) {
|
||
String string = (String)l.this.var_java_util_List_java_lang_String__a.get(y2.java_lang_String_a());
|
||
y2.javax_swing_JTextField_a().setText(string == null ? y2.java_lang_String_a() : string);
|
||
}
|
||
}
|
||
});
|
||
jRadioButton2.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
for (y y2 : l.this.b) {
|
||
String string = (String)l.this.var_java_util_List_java_lang_String__a.get(y2.java_lang_String_a());
|
||
y2.javax_swing_JTextField_a().setText(string == null ? n.e(y2.java_lang_String_a()) : string);
|
||
}
|
||
}
|
||
});
|
||
jRadioButton3.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
for (y y2 : l.this.b) {
|
||
String string = (String)l.this.var_java_util_List_java_lang_String__a.get(y2.java_lang_String_a());
|
||
y2.javax_swing_JTextField_a().setText(string == null ? y2.java_lang_String_a().toLowerCase() : string);
|
||
}
|
||
}
|
||
});
|
||
return new JBScrollPane((Component)jPanel);
|
||
}
|
||
|
||
private String a(PsiClass psiClass, String string) {
|
||
for (PsiField psiField : psiClass.getAllFields()) {
|
||
String string2;
|
||
if (psiField.getName() == null || !psiField.getName().equals(string) || (string2 = com.ccnode.codegenerator.ad.y.java_lang_String_a(psiField)) == null) continue;
|
||
return string2;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private void b() {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.io.Files
|
||
* com.intellij.codeInsight.CodeInsightUtil
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.fileChooser.FileChooser
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptor
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.module.ModuleManager
|
||
* com.intellij.openapi.options.ShowSettingsUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.util.Pair
|
||
* com.intellij.openapi.vfs.VfsUtil
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.openapi.vfs.VirtualFileManager
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiManager
|
||
* com.intellij.ui.components.JBScrollPane
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.util.Consumer
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.FileUtils
|
||
* org.apache.commons.lang3.Validate
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.n.h;
|
||
import com.ccnode.codegenerator.n.n;
|
||
import com.ccnode.codegenerator.n.o;
|
||
import com.ccnode.codegenerator.n.p;
|
||
import com.ccnode.codegenerator.n.s;
|
||
import com.ccnode.codegenerator.n.v;
|
||
import com.ccnode.codegenerator.q.a_0;
|
||
import com.ccnode.codegenerator.u.g;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.io.Files;
|
||
import com.intellij.codeInsight.CodeInsightUtil;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.fileChooser.FileChooser;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.module.ModuleManager;
|
||
import com.intellij.openapi.options.ShowSettingsUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.util.Pair;
|
||
import com.intellij.openapi.vfs.VfsUtil;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiManager;
|
||
import com.intellij.ui.components.JBScrollPane;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.util.Consumer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.File;
|
||
import java.io.IOException;
|
||
import java.lang.reflect.Method;
|
||
import java.nio.charset.Charset;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.ResourceBundle;
|
||
import java.util.UUID;
|
||
import javax.swing.AbstractAction;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.Action;
|
||
import javax.swing.BoxLayout;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.FileUtils;
|
||
import org.apache.commons.lang3.Validate;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class k
|
||
extends DialogWrapper {
|
||
public static final String var_java_lang_String_a = "src/main/java";
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTable var_javax_swing_JTable_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JTextField var_javax_swing_JTextField_c;
|
||
private JButton var_javax_swing_JButton_b;
|
||
private JButton var_javax_swing_JButton_c;
|
||
private JButton d;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JCheckBox var_javax_swing_JCheckBox_a;
|
||
private JCheckBox var_javax_swing_JCheckBox_b;
|
||
private JRadioButton var_javax_swing_JRadioButton_a;
|
||
private JRadioButton var_javax_swing_JRadioButton_b;
|
||
public JLabel var_javax_swing_JLabel_a;
|
||
public JButton var_javax_swing_JButton_a;
|
||
private AbstractAction var_javax_swing_AbstractAction_a;
|
||
private ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
private static String var_java_lang_String_b;
|
||
private static String var_java_lang_String_c;
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private List<com.ccnode.codegenerator.n.a.a> var_java_util_List_com_ccnode_codegenerator_n_a_a__b;
|
||
private Map<JTextField, List<String>> var_java_util_Map_javax_swing_JTextField,_java_util_List_java_lang_String___a;
|
||
private Map<JTextField, List<String>> var_java_util_Map_javax_swing_JTextField,_java_util_List_java_lang_String___b;
|
||
private n var_com_ccnode_codegenerator_n_n_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public k(Project project, PsiClass psiClass, List<PsiField> list) {
|
||
super(project, true);
|
||
List<VirtualFile> list2;
|
||
Object object2;
|
||
Module[] moduleArray;
|
||
this.var_java_lang_String_a = Lists.newArrayList();
|
||
this.var_java_lang_String_a = Maps.newHashMap();
|
||
this.var_javax_swing_JTextField_b = Maps.newHashMap();
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
e e2 = e.com_ccnode_codegenerator_ag_e_e_a(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = e2.a().getProjectProfile();
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.var_javax_swing_JTextField_b = t_0.var_com_ccnode_codegenerator_ad_t_0_a.a((List<? extends PsiField>)list);
|
||
if (this.var_javax_swing_JTextField_b.size() == 0) {
|
||
// empty if block
|
||
}
|
||
for (Object object2 : moduleArray = ModuleManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getModules()) {
|
||
list2 = com.ccnode.codegenerator.y.b.a.c((Module)object2);
|
||
if (list2.isEmpty()) continue;
|
||
for (VirtualFile virtualFile : list2) {
|
||
this.var_java_lang_String_a.add(virtualFile.getPath().replace("\\", "/"));
|
||
}
|
||
}
|
||
this.e();
|
||
String string = psiClass.getContainingFile().getVirtualFile().getParent().getPath();
|
||
String string2 = psiClass.getName();
|
||
String string3 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDatabase();
|
||
this.var_javax_swing_JLabel_a.setText(A.a("currentDbIs") + ":" + string3);
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
ShowSettingsUtil.getInstance().showSettingsDialog(k.this.var_com_intellij_openapi_project_Project_a, com.ccnode.codegenerator.i.a_0.class);
|
||
}
|
||
});
|
||
this.var_javax_swing_JTextField_a.setColumns(15);
|
||
this.var_javax_swing_JTextField_a.setText(t_0.var_com_ccnode_codegenerator_ad_t_0_a.b(psiClass));
|
||
this.void_a();
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getGenSqlFilePath() == null) {
|
||
this.var_javax_swing_JTextField_c.setText(string);
|
||
} else {
|
||
this.var_javax_swing_JTextField_c.setText(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getGenSqlFilePath());
|
||
}
|
||
object2 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
this.var_javax_swing_JTextField_b.setText(string2 + ".sql");
|
||
this.a(this.var_javax_swing_JButton_b, this.var_javax_swing_JTextField_c);
|
||
this.var_javax_swing_JPanel_a.setLayout(new BoxLayout(this.var_javax_swing_JPanel_a, 3));
|
||
this.var_javax_swing_JButton_c.addActionListener(new a());
|
||
this.d.addActionListener(new b());
|
||
this.var_javax_swing_JCheckBox_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = k.this.var_javax_swing_JTable_a.getRowCount();
|
||
if (k.this.var_javax_swing_JCheckBox_a.isSelected()) {
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
Boolean bl = (Boolean)k.this.var_javax_swing_JTable_a.getValueAt(i2, 5);
|
||
if (bl.booleanValue()) continue;
|
||
k.this.var_javax_swing_JTable_a.setValueAt(true, i2, 6);
|
||
}
|
||
} else {
|
||
for (int i3 = 0; i3 < n2; ++i3) {
|
||
Boolean bl = (Boolean)k.this.var_javax_swing_JTable_a.getValueAt(i3, 5);
|
||
if (bl.booleanValue()) continue;
|
||
k.this.var_javax_swing_JTable_a.setValueAt(false, i3, 6);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JCheckBox_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = k.this.var_javax_swing_JTable_a.getRowCount();
|
||
if (k.this.var_javax_swing_JCheckBox_b.isSelected()) {
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
Boolean bl = (Boolean)k.this.var_javax_swing_JTable_a.getValueAt(i2, 5);
|
||
if (bl.booleanValue()) continue;
|
||
k.this.var_javax_swing_JTable_a.setValueAt(false, i2, 7);
|
||
}
|
||
} else {
|
||
for (int i3 = 0; i3 < n2; ++i3) {
|
||
Boolean bl = (Boolean)k.this.var_javax_swing_JTable_a.getValueAt(i3, 5);
|
||
if (bl.booleanValue()) continue;
|
||
k.this.var_javax_swing_JTable_a.setValueAt(true, i3, 7);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
list2 = new ButtonGroup();
|
||
((ButtonGroup)((Object)list2)).add(this.var_javax_swing_JRadioButton_a);
|
||
((ButtonGroup)((Object)list2)).add(this.var_javax_swing_JRadioButton_b);
|
||
this.var_javax_swing_JRadioButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (k.this.var_javax_swing_JRadioButton_a.isSelected()) {
|
||
int n2 = k.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string = (String)k.this.var_javax_swing_JTable_a.getValueAt(i2, 0);
|
||
k.this.var_javax_swing_JTable_a.setValueAt(com.ccnode.codegenerator.ad.n.e(string), i2, 1);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JRadioButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = k.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string = (String)k.this.var_javax_swing_JTable_a.getValueAt(i2, 0);
|
||
k.this.var_javax_swing_JTable_a.setValueAt(string, i2, 1);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_AbstractAction_a = new AbstractAction("Preview Sql"){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
File file = Files.createTempDir();
|
||
String string = UUID.randomUUID().toString() + ".sql";
|
||
if (k.this.a(file.getAbsolutePath(), string, true)) {
|
||
return;
|
||
}
|
||
try {
|
||
String string2 = FileUtils.readFileToString((File)new File(file + "/" + string), (Charset)Charsets.UTF_8).replace("\r\n", "\n");
|
||
Pair<Language, FileType> pair = com.ccnode.codegenerator.g.b.a();
|
||
com.ccnode.codegenerator.mybatisGenerator.h h2 = new com.ccnode.codegenerator.mybatisGenerator.h(k.this.var_com_intellij_openapi_project_Project_a, string, string2, (FileType)pair.getSecond());
|
||
h2.showAndGet();
|
||
}
|
||
catch (IOException iOException) {
|
||
iOException.printStackTrace();
|
||
}
|
||
}
|
||
};
|
||
this.setTitle("create new mybatis files");
|
||
this.init();
|
||
}
|
||
|
||
private void a(JButton jButton, JTextField jTextField) {
|
||
jButton.addActionListener(new ActionListener(){
|
||
final /* synthetic */ JTextField var_javax_swing_JTextField_a;
|
||
final /* synthetic */ k var_com_ccnode_codegenerator_n_k_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_n_k_a = k2;
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||
fileChooserDescriptor.setShowFileSystemRoots(true);
|
||
fileChooserDescriptor.setTitle("Choose a folder...");
|
||
fileChooserDescriptor.setDescription("choose the path to store file");
|
||
fileChooserDescriptor.setHideIgnored(false);
|
||
fileChooserDescriptor.setRoots(new VirtualFile[]{this.var_com_ccnode_codegenerator_n_k_a.var_com_intellij_openapi_project_Project_a.getBaseDir()});
|
||
FileChooser.chooseFiles((FileChooserDescriptor)fileChooserDescriptor, (Project)this.var_com_ccnode_codegenerator_n_k_a.var_com_intellij_openapi_project_Project_a, (VirtualFile)this.var_com_ccnode_codegenerator_n_k_a.var_com_intellij_psi_PsiClass_a.getContainingFile().getVirtualFile(), (Consumer)new Consumer<List<VirtualFile>>(){
|
||
|
||
public void a(List<VirtualFile> list) {
|
||
var_javax_swing_JTextField_a.setText(list.get(0).getPath());
|
||
}
|
||
|
||
public /* synthetic */ void consume(Object object) {
|
||
this.a((List)object);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
|
||
private void void_a() {
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JTable_a = new v((List<com.ccnode.codegenerator.n.a.a>)((Object)this.var_javax_swing_JTextField_b), this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
@NotNull
|
||
protected Action[] createLeftSideActions() {
|
||
Action[] actionArray = new Action[]{this.var_javax_swing_AbstractAction_a};
|
||
return actionArray;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
if (this.a(this.var_javax_swing_JTextField_c.getText(), this.var_javax_swing_JTextField_b.getText().trim(), false)) {
|
||
return;
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
|
||
private boolean a(String string, String string2, boolean bl) {
|
||
Object object2;
|
||
try {
|
||
this.d();
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)exception.getMessage(), (String)"Validate Fail");
|
||
return true;
|
||
}
|
||
n n2 = new n();
|
||
n2.a(this.var_com_intellij_openapi_project_Project_a);
|
||
ArrayList<h> arrayList = new ArrayList<h>();
|
||
for (int i2 = 0; i2 < this.var_javax_swing_JTextField_b.size(); ++i2) {
|
||
object2 = v.a(i2, this.var_javax_swing_JTable_a, com.ccnode.codegenerator.ag.e.b.a(this.var_com_intellij_openapi_project_Project_a));
|
||
if (((h)object2).java_lang_Boolean_d().booleanValue()) {
|
||
n2.a((h)object2);
|
||
}
|
||
arrayList.add((h)object2);
|
||
}
|
||
if (n2.com_ccnode_codegenerator_n_h_a() == null) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"please set a primary key", (String)"Validate Fail");
|
||
return true;
|
||
}
|
||
HashMap<p, o> hashMap = new HashMap<p, o>();
|
||
object2 = e.com_ccnode_codegenerator_ag_e_e_a(this.var_com_intellij_openapi_project_Project_a);
|
||
o o2 = new o();
|
||
o2.b(string2);
|
||
o2.c(string.trim());
|
||
o2.e(o2.c() + "/" + string2);
|
||
hashMap.put(p.var_com_ccnode_codegenerator_n_p_a, o2);
|
||
HashMap hashMap2 = Maps.newHashMap();
|
||
for (h object3 : arrayList) {
|
||
hashMap2.put(object3.java_lang_String_c(), object3.java_lang_String_d());
|
||
}
|
||
if (this.var_java_lang_String_a.size() != 0) {
|
||
this.var_java_lang_String_a.forEach((jTextField, list) -> {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (String string : list) {
|
||
arrayList.add((String)hashMap2.get(string));
|
||
}
|
||
n2.b().add(arrayList);
|
||
});
|
||
}
|
||
if (this.var_javax_swing_JTextField_b.size() != 0) {
|
||
this.var_javax_swing_JTextField_b.forEach((jTextField, list) -> {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (String string : list) {
|
||
arrayList.add((String)hashMap2.get(string));
|
||
}
|
||
n2.c().add(arrayList);
|
||
});
|
||
}
|
||
if (hashMap.isEmpty()) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"please choose at least one file", (String)"NO FILE CHOOSED");
|
||
return true;
|
||
}
|
||
n2.a(hashMap);
|
||
n2.a(arrayList);
|
||
n2.a(this.var_javax_swing_JTextField_a.getText());
|
||
this.var_com_ccnode_codegenerator_n_n_a = n2;
|
||
this.c();
|
||
a_0 a_02 = new a_0();
|
||
a_02.a(this.var_com_intellij_psi_PsiClass_a.getQualifiedName());
|
||
a_02.b(this.var_com_intellij_psi_PsiClass_a.getName());
|
||
n n3 = this.com_ccnode_codegenerator_n_n_a();
|
||
n3.a(a_02);
|
||
g.var_com_ccnode_codegenerator_u_g_a.a(n3);
|
||
VirtualFileManager.getInstance().syncRefresh();
|
||
o o3 = n3.a().get((Object)p.var_com_ccnode_codegenerator_n_p_a);
|
||
if (!bl) {
|
||
ProjectProfile projectProfile = ((e)object2).a().getProjectProfile();
|
||
projectProfile.setGenSqlFilePath(string.trim());
|
||
if (o3 != null) {
|
||
PsiFile psiFile;
|
||
String string3 = o3.e();
|
||
VirtualFile virtualFile = VirtualFileManager.getInstance().refreshAndFindFileByUrl(VfsUtil.pathToUrl((String)string3));
|
||
if (virtualFile != null && (psiFile = PsiManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).findFile(virtualFile)) != null) {
|
||
CodeInsightUtil.positionCursor((Project)this.var_com_intellij_openapi_project_Project_a, (PsiFile)psiFile, (PsiElement)psiFile);
|
||
}
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
private void c() {
|
||
}
|
||
|
||
private void d() {
|
||
Validate.notBlank((CharSequence)this.var_javax_swing_JTextField_a.getText(), (String)"table name is empty", (Object[])new Object[0]);
|
||
for (int i2 = 0; i2 < this.var_javax_swing_JTextField_b.size(); ++i2) {
|
||
Object object = this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string = "column name is empty on row " + i2;
|
||
Validate.notNull((Object)object, (String)string, (Object[])new Object[0]);
|
||
if (!(object instanceof String)) {
|
||
throw new RuntimeException(string);
|
||
}
|
||
Validate.notBlank((CharSequence)((String)object), (String)string, (Object[])new Object[0]);
|
||
}
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return new JBScrollPane((Component)this.var_javax_swing_JPanel_b);
|
||
}
|
||
|
||
private void e() {
|
||
this.b();
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel, new GridConstraints(1, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "tablename"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
this.var_javax_swing_JTextField_a.setText("");
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 0, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel2, new GridConstraints(3, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel2.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, new Dimension(-1, 300), null, null, 0, false));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTable_a);
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel3, new GridConstraints(4, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
this.var_javax_swing_JTextField_b.setText("");
|
||
jPanel3.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "sql.file.name"));
|
||
jPanel3.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "sql.file.path"));
|
||
jPanel3.add((Component)jLabel3, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
jPanel3.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(1, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.a((AbstractButton)this.var_javax_swing_JButton_b, this.a("i18n/i18n", "open.folder"));
|
||
jPanel3.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(1, 2, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel4, new GridConstraints(2, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", "all.column.nuallable"));
|
||
jPanel4.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_b = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_b, this.a("i18n/i18n", "allcolumnnodefaultvalue"));
|
||
jPanel4.add((Component)this.var_javax_swing_JCheckBox_b, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_a = new JRadioButton();
|
||
this.var_javax_swing_JRadioButton_a.setSelected(true);
|
||
this.a(this.var_javax_swing_JRadioButton_a, this.a("i18n/i18n", "columnnamelowerunderscore"));
|
||
jPanel4.add((Component)this.var_javax_swing_JRadioButton_a, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_b = new JRadioButton();
|
||
this.a(this.var_javax_swing_JRadioButton_b, this.a("i18n/i18n", "columnnamesametofieldname"));
|
||
jPanel4.add((Component)this.var_javax_swing_JRadioButton_b, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane2 = new JScrollPane();
|
||
this.var_javax_swing_JPanel_b.add((Component)jScrollPane2, new GridConstraints(5, 0, 1, 2, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new FlowLayout(1, 5, 5));
|
||
jScrollPane2.setViewportView(this.var_javax_swing_JPanel_a);
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.a((AbstractButton)this.var_javax_swing_JButton_c, this.a("i18n/i18n", "add.multiple.column.index"));
|
||
this.var_javax_swing_JPanel_a.add(this.var_javax_swing_JButton_c);
|
||
this.d = new JButton();
|
||
this.a((AbstractButton)this.d, this.a("i18n/i18n", "add.multiple.column.unique"));
|
||
this.var_javax_swing_JPanel_a.add(this.d);
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.var_javax_swing_JLabel_a.setText("Label");
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a((AbstractButton)this.var_javax_swing_JButton_a, this.a("i18n/i18n", "change.database.type"));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
public n com_ccnode_codegenerator_n_n_a() {
|
||
return this.var_com_ccnode_codegenerator_n_n_a;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_b = ".java";
|
||
var_java_lang_String_c = ".xml";
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
|
||
private class a
|
||
implements ActionListener {
|
||
private a() {
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
List<String> list;
|
||
s s2;
|
||
boolean bl;
|
||
if (k.this.var_javax_swing_JButton_c.isEnabled() && (bl = (s2 = new s((List<com.ccnode.codegenerator.n.a.a>)((Object)k.this.var_javax_swing_JTextField_b), k.this.var_com_intellij_openapi_project_Project_a, "add multiple column index")).showAndGet()) && (list = s2.a()).size() > 0) {
|
||
Object object2 = "index:";
|
||
for (String object3 : list) {
|
||
object2 = (String)object2 + object3 + ",";
|
||
}
|
||
object2 = ((String)object2).substring(0, ((String)object2).length() - 1);
|
||
JTextField jTextField = new JTextField((String)object2);
|
||
jTextField.setEditable(false);
|
||
JButton jButton = new JButton("remove");
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.add(jTextField);
|
||
jPanel.add(jButton);
|
||
k.this.var_javax_swing_JPanel_a.add(jPanel);
|
||
jButton.addActionListener(new ActionListener(){
|
||
final /* synthetic */ JPanel var_javax_swing_JPanel_a;
|
||
final /* synthetic */ JTextField var_javax_swing_JTextField_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_n_k$a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_n_k$a_a = a2;
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_com_ccnode_codegenerator_n_k$a_a.k.this.var_javax_swing_JPanel_a.remove(this.var_javax_swing_JPanel_a);
|
||
this.var_com_ccnode_codegenerator_n_k$a_a.k.this.var_java_lang_String_a.remove(this.var_javax_swing_JTextField_a);
|
||
this.var_com_ccnode_codegenerator_n_k$a_a.k.this.var_javax_swing_JPanel_a.revalidate();
|
||
this.var_com_ccnode_codegenerator_n_k$a_a.k.this.var_javax_swing_JPanel_a.repaint();
|
||
}
|
||
});
|
||
k.this.var_javax_swing_JPanel_a.revalidate();
|
||
k.this.var_javax_swing_JPanel_a.repaint();
|
||
k.this.var_java_lang_String_a.put(jTextField, list);
|
||
}
|
||
}
|
||
}
|
||
|
||
private class b
|
||
implements ActionListener {
|
||
private b() {
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
List<String> list;
|
||
s s2;
|
||
boolean bl;
|
||
if (k.this.d.isEnabled() && (bl = (s2 = new s((List<com.ccnode.codegenerator.n.a.a>)((Object)k.this.var_javax_swing_JTextField_b), k.this.var_com_intellij_openapi_project_Project_a, "add multiple column unique")).showAndGet()) && (list = s2.a()).size() > 0) {
|
||
Object object2 = "unique:";
|
||
for (String object3 : list) {
|
||
object2 = (String)object2 + object3 + ",";
|
||
}
|
||
object2 = ((String)object2).substring(0, ((String)object2).length() - 1);
|
||
JTextField jTextField = new JTextField((String)object2);
|
||
jTextField.setColumns(40);
|
||
jTextField.setEditable(false);
|
||
JButton jButton = new JButton("remove");
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.add(jTextField);
|
||
jPanel.add(jButton);
|
||
k.this.var_javax_swing_JPanel_a.add(jPanel);
|
||
jButton.addActionListener(new ActionListener(){
|
||
final /* synthetic */ JPanel var_javax_swing_JPanel_a;
|
||
final /* synthetic */ JTextField var_javax_swing_JTextField_a;
|
||
final /* synthetic */ b var_com_ccnode_codegenerator_n_k$b_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_n_k$b_a = b2;
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_com_ccnode_codegenerator_n_k$b_a.k.this.var_javax_swing_JPanel_a.remove(this.var_javax_swing_JPanel_a);
|
||
this.var_com_ccnode_codegenerator_n_k$b_a.k.this.var_javax_swing_JTextField_b.remove((Object)this.var_javax_swing_JTextField_a);
|
||
this.var_com_ccnode_codegenerator_n_k$b_a.k.this.var_javax_swing_JPanel_a.revalidate();
|
||
this.var_com_ccnode_codegenerator_n_k$b_a.k.this.var_javax_swing_JPanel_a.repaint();
|
||
}
|
||
});
|
||
k.this.var_javax_swing_JPanel_a.revalidate();
|
||
k.this.var_javax_swing_JPanel_a.repaint();
|
||
k.this.var_javax_swing_JTextField_b.put(jTextField, list);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.n.h;
|
||
import com.ccnode.codegenerator.n.o;
|
||
import com.ccnode.codegenerator.n.p;
|
||
import com.ccnode.codegenerator.q.a_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
public class n {
|
||
private List<h> var_java_util_List_com_ccnode_codegenerator_n_h__a;
|
||
private h var_com_ccnode_codegenerator_n_h_a;
|
||
private Map<p, o> var_java_util_Map_com_ccnode_codegenerator_n_p,_com_ccnode_codegenerator_n_o__a;
|
||
private List<List<String>> b = Lists.newArrayList();
|
||
private List<List<String>> c = Lists.newArrayList();
|
||
private String var_java_lang_String_a;
|
||
private a_0 var_com_ccnode_codegenerator_q_a_0_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
|
||
public a_0 com_ccnode_codegenerator_q_a_0_a() {
|
||
return this.var_com_ccnode_codegenerator_q_a_0_a;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void a(a_0 a_02) {
|
||
this.var_com_ccnode_codegenerator_q_a_0_a = a_02;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public List<h> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_n_h__a;
|
||
}
|
||
|
||
public void a(List<h> list) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_n_h__a = list;
|
||
}
|
||
|
||
public h com_ccnode_codegenerator_n_h_a() {
|
||
return this.var_com_ccnode_codegenerator_n_h_a;
|
||
}
|
||
|
||
public void a(h h2) {
|
||
this.var_com_ccnode_codegenerator_n_h_a = h2;
|
||
}
|
||
|
||
public Map<p, o> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_n_h__a;
|
||
}
|
||
|
||
public void a(Map<p, o> map) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_n_h__a = map;
|
||
}
|
||
|
||
public List<List<String>> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(List<List<String>> list) {
|
||
this.b = list;
|
||
}
|
||
|
||
public List<List<String>> c() {
|
||
return this.c;
|
||
}
|
||
|
||
public void c(List<List<String>> list) {
|
||
this.c = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
public class o {
|
||
private String a;
|
||
private String b;
|
||
private String c;
|
||
private String d;
|
||
private String e;
|
||
|
||
public String a() {
|
||
return this.e;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.e = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String c() {
|
||
return this.b;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String d() {
|
||
return this.c;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.c = string;
|
||
}
|
||
|
||
public String e() {
|
||
return this.d;
|
||
}
|
||
|
||
public void e(String string) {
|
||
this.d = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
public final class p
|
||
extends Enum<p> {
|
||
public static final /* enum */ p var_com_ccnode_codegenerator_n_p_a;
|
||
public static final /* enum */ p b;
|
||
public static final /* enum */ p c;
|
||
public static final /* enum */ p d;
|
||
public static final /* enum */ p e;
|
||
private static final /* synthetic */ p[] var_com_ccnode_codegenerator_n_p_arr_a;
|
||
|
||
public static p[] a() {
|
||
return (p[])var_com_ccnode_codegenerator_n_p_arr_a.clone();
|
||
}
|
||
|
||
public static p a(String string) {
|
||
return Enum.valueOf(p.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ p[] b() {
|
||
return new p[]{var_com_ccnode_codegenerator_n_p_a, b, c, d, e};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_n_p_a = new p();
|
||
b = new p();
|
||
c = new p();
|
||
d = new p();
|
||
e = new p();
|
||
var_com_ccnode_codegenerator_n_p_arr_a = p.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.ac.a;
|
||
import com.ccnode.codegenerator.ac.c;
|
||
import com.ccnode.codegenerator.ac.d;
|
||
import com.ccnode.codegenerator.ac.e;
|
||
import com.ccnode.codegenerator.ac.f;
|
||
import com.ccnode.codegenerator.ac.g;
|
||
import com.ccnode.codegenerator.freemarker.dto.ColumnAndFieldAndJdbcType;
|
||
import com.ccnode.codegenerator.n.b.a.b;
|
||
import com.ccnode.codegenerator.n.h;
|
||
import com.ccnode.codegenerator.n.m;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.regex.Matcher;
|
||
import java.util.regex.Pattern;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class q {
|
||
public static final String var_java_lang_String_a = "select";
|
||
public static final String b = "from";
|
||
public static final String c = "insert into";
|
||
private static Map<com.ccnode.codegenerator.q.b, e> var_java_util_Map_com_ccnode_codegenerator_q_b,_com_ccnode_codegenerator_ac_e__a;
|
||
|
||
/*
|
||
* WARNING - void declaration
|
||
*/
|
||
@Nullable
|
||
static String a(List<h> list, List<b> list2, String string, List<ColumnAndFieldAndJdbcType> list3, String string2) {
|
||
void var13_15;
|
||
int n2;
|
||
int n22;
|
||
string = string.replaceAll("<!--[\\s\\S]*?-->", "");
|
||
String string3 = string = q.d(string);
|
||
int n3 = 0;
|
||
int n4 = string.length();
|
||
String string4 = string.toLowerCase();
|
||
int n5 = q.a(string4, b);
|
||
if (n5 != -1) {
|
||
n4 = n5;
|
||
string3 = string.substring(0, n5);
|
||
}
|
||
if ((n22 = q.a(string4, var_java_lang_String_a)) != -1) {
|
||
n3 = n22 + var_java_lang_String_a.length();
|
||
string3 = string3.substring(n22 + var_java_lang_String_a.length());
|
||
}
|
||
if (string3.contains("(")) {
|
||
return null;
|
||
}
|
||
String[] stringArray = string3.split(",");
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
String[] object = stringArray;
|
||
int n6 = object.length;
|
||
for (n2 = 0; n2 < n6; ++n2) {
|
||
String string5 = object[n2];
|
||
String string6 = q.e(string5);
|
||
boolean bl = false;
|
||
for (b b2 : list2) {
|
||
if (!string6.toLowerCase().equals(b2.getColumn().toLowerCase())) continue;
|
||
bl = true;
|
||
break;
|
||
}
|
||
if (bl) continue;
|
||
arrayList.add(string5);
|
||
}
|
||
String string7 = "";
|
||
for (n6 = 0; n6 < arrayList.size(); ++n6) {
|
||
String string8 = (String)var13_15 + (String)arrayList.get(n6);
|
||
if (n6 == arrayList.size() - 1) continue;
|
||
String string9 = string8 + ",";
|
||
}
|
||
Object object2 = "";
|
||
for (n2 = 0; n2 < list.size(); ++n2) {
|
||
object2 = (String)object2 + ",\n" + com.ccnode.codegenerator.l.b.a(list.get(n2).java_lang_String_d(), string2);
|
||
}
|
||
String string10 = string.substring(0, n3) + (String)var13_15 + (String)object2 + string.substring(n4) + "\n";
|
||
return string10;
|
||
}
|
||
|
||
private static int a(String string, String string2) {
|
||
Pattern pattern = Pattern.compile("\\b" + string2 + "\\b");
|
||
Matcher matcher = pattern.matcher(string);
|
||
if (matcher.find()) {
|
||
return matcher.start();
|
||
}
|
||
return -1;
|
||
}
|
||
|
||
private static String e(String string) {
|
||
int n2 = string.length();
|
||
int n3 = 0;
|
||
int n4 = string.length();
|
||
char c2 = string.charAt(n3++);
|
||
while (n3 != n2 && c2 == '\n' || c2 == ' ' || c2 == '\t' || c2 == '`') {
|
||
c2 = string.charAt(n3++);
|
||
}
|
||
if (n3 == n2) {
|
||
return "";
|
||
}
|
||
c2 = string.charAt(--n4);
|
||
while (n4 >= n3 && c2 == '\n' || c2 == ' ' || c2 == '\t' || c2 == '`') {
|
||
c2 = string.charAt(--n4);
|
||
}
|
||
return string.substring(n3 - 1, n4 + 1);
|
||
}
|
||
|
||
public static String a(m m2) {
|
||
com.ccnode.codegenerator.q.b b2;
|
||
if (m2.b() == null) {
|
||
m2.a("");
|
||
}
|
||
if (var_java_lang_String_a.containsKey((Object)(b2 = com.ccnode.codegenerator.q.b.a(m2.com_ccnode_codegenerator_n_b_a_a_a().java_lang_String_a())))) {
|
||
return ((e)var_java_lang_String_a.get((Object)b2)).a(m2);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public static String a(String string) {
|
||
char c2;
|
||
if (string.length() == 0) {
|
||
return null;
|
||
}
|
||
String string2 = q.f(string);
|
||
String string3 = string2.toLowerCase();
|
||
int n2 = string3.indexOf(c);
|
||
if (n2 == -1) {
|
||
return null;
|
||
}
|
||
int n3 = n2 + c.length() + 1;
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (int i2 = n3; i2 < string3.length() && !q.a(c2 = string3.charAt(i2)); ++i2) {
|
||
stringBuilder.append(string2.charAt(i2));
|
||
}
|
||
if (stringBuilder.length() > 0) {
|
||
return stringBuilder.toString();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private static String f(String string) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
char c2 = string.charAt(0);
|
||
stringBuilder.append(c2);
|
||
boolean bl = q.a(c2);
|
||
for (int i2 = 1; i2 < string.length(); ++i2) {
|
||
char c3 = string.charAt(i2);
|
||
boolean bl2 = q.a(c3);
|
||
if (bl2 && bl) continue;
|
||
stringBuilder.append(c3);
|
||
bl = bl2;
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
private static boolean a(char c2) {
|
||
return c2 == ' ' || c2 == '\t' || c2 == '\n' || c2 == '(' || c2 == '<' || c2 == ')' || c2 == '>';
|
||
}
|
||
|
||
@NotNull
|
||
public static String b(String string) {
|
||
int n2 = string.lastIndexOf(".");
|
||
return string.substring(n2 + 1);
|
||
}
|
||
|
||
@Nullable
|
||
public static String c(String string) {
|
||
int n2 = string.lastIndexOf(".");
|
||
if (n2 == -1) {
|
||
return null;
|
||
}
|
||
return string.substring(0, n2);
|
||
}
|
||
|
||
public static String d(String string) {
|
||
int n2 = string.length();
|
||
int n3 = n2 - 1;
|
||
for (int i2 = n2 - 1; i2 >= 0; --i2) {
|
||
char c2 = string.charAt(i2);
|
||
if (c2 == '\n' || c2 == '\t' || c2 == ' ') continue;
|
||
n3 = i2;
|
||
break;
|
||
}
|
||
return string.substring(0, n3 + 1);
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_a = new HashMap<com.ccnode.codegenerator.q.b, e>(){
|
||
{
|
||
this.put(com.ccnode.codegenerator.q.b.var_com_ccnode_codegenerator_q_b_a, new a());
|
||
this.put(com.ccnode.codegenerator.q.b.c, new c());
|
||
this.put(com.ccnode.codegenerator.q.b.d, new f());
|
||
this.put(com.ccnode.codegenerator.q.b.f, new d());
|
||
this.put(com.ccnode.codegenerator.q.b.e, new g());
|
||
this.put(com.ccnode.codegenerator.q.b.b, new com.ccnode.codegenerator.ac.b());
|
||
}
|
||
};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.Insets;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class r
|
||
extends DialogWrapper {
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private final String var_java_lang_String_a;
|
||
|
||
public r(@Nullable Project project, String string) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_a = string;
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.anchor = 17;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
|
||
jPanel.add((Component)new JLabel("the method sql already exist in mapper,the existed value is:"), gridBagConstraints);
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 1;
|
||
JTextArea jTextArea = new JTextArea(this.var_java_lang_String_a);
|
||
jTextArea.setEditable(false);
|
||
jPanel.add((Component)jTextArea, gridBagConstraints);
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.gridy = 2;
|
||
jPanel.add((Component)new JLabel("do you want to override them?"), gridBagConstraints);
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.n.a.a;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.List;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextField;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class s
|
||
extends DialogWrapper {
|
||
private List<String> var_java_util_List_java_lang_String__a = Lists.newArrayList();
|
||
private List<String> b = Lists.newArrayList();
|
||
private List<JCheckBox> c = Lists.newArrayList();
|
||
private JTextField var_javax_swing_JTextField_a = new JTextField("");
|
||
|
||
public s(List<a> list, Project project, String string) {
|
||
super(project, false);
|
||
for (a a2 : list) {
|
||
this.b.add(a2.b());
|
||
}
|
||
this.setTitle(string);
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.anchor = 18;
|
||
gridBagConstraints.fill = 1;
|
||
this.var_javax_swing_JTextField_a.setEditable(false);
|
||
this.var_javax_swing_JTextField_a.setColumns(50);
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, gridBagConstraints);
|
||
++gridBagConstraints.gridx;
|
||
JButton jButton = new JButton("clear");
|
||
jPanel.add((Component)jButton, gridBagConstraints);
|
||
gridBagConstraints.gridx = 0;
|
||
jButton.addActionListener(new ActionListener(){
|
||
final /* synthetic */ GridBagConstraints var_java_awt_GridBagConstraints_a;
|
||
final /* synthetic */ JPanel var_javax_swing_JPanel_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_n_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_n_s_a = s2;
|
||
this.var_java_awt_GridBagConstraints_a = gridBagConstraints;
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent2) {
|
||
String string = this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.getText();
|
||
if (string.length() == 0) {
|
||
return;
|
||
}
|
||
String[] stringArray = string.split(",");
|
||
if (stringArray.length > 0) {
|
||
for (String string2 : stringArray) {
|
||
JCheckBox jCheckBox = new JCheckBox(string2);
|
||
++this.var_java_awt_GridBagConstraints_a.gridy;
|
||
this.var_javax_swing_JPanel_a.add((Component)jCheckBox, this.var_java_awt_GridBagConstraints_a);
|
||
jCheckBox.addActionListener(actionEvent -> {
|
||
if (jCheckBox.isEnabled()) {
|
||
this.var_javax_swing_JPanel_a.remove(jCheckBox);
|
||
String string = this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.getText();
|
||
if (string.length() > 0) {
|
||
this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.setText(this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.getText() + "," + jCheckBox.getText());
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.setText(jCheckBox.getText());
|
||
}
|
||
this.var_javax_swing_JPanel_a.revalidate();
|
||
this.var_javax_swing_JPanel_a.repaint();
|
||
}
|
||
});
|
||
}
|
||
this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.setText("");
|
||
this.var_com_ccnode_codegenerator_n_s_a.var_javax_swing_JTextField_a.setColumns(50);
|
||
this.var_javax_swing_JPanel_a.revalidate();
|
||
this.var_javax_swing_JPanel_a.repaint();
|
||
}
|
||
}
|
||
});
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
for (String string : this.b) {
|
||
++gridBagConstraints.gridy;
|
||
JCheckBox jCheckBox = new JCheckBox(string);
|
||
jCheckBox.addActionListener(actionEvent -> {
|
||
if (jCheckBox.isEnabled()) {
|
||
jPanel.remove(jCheckBox);
|
||
String string = this.var_javax_swing_JTextField_a.getText();
|
||
if (string.length() > 0) {
|
||
this.var_javax_swing_JTextField_a.setText(this.var_javax_swing_JTextField_a.getText() + "," + jCheckBox.getText());
|
||
} else {
|
||
this.var_javax_swing_JTextField_a.setText(jCheckBox.getText());
|
||
}
|
||
jPanel.revalidate();
|
||
jPanel.repaint();
|
||
}
|
||
});
|
||
jPanel.add((Component)jCheckBox, gridBagConstraints);
|
||
this.c.add(jCheckBox);
|
||
}
|
||
++gridBagConstraints.gridy;
|
||
return new JScrollPane(jPanel);
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
if (this.var_javax_swing_JTextField_a.getText().length() > 0) {
|
||
String[] stringArray;
|
||
String string = this.var_javax_swing_JTextField_a.getText();
|
||
for (String string2 : stringArray = string.split(",")) {
|
||
this.var_java_util_List_java_lang_String__a.add(string2);
|
||
}
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
|
||
public List<String> a() {
|
||
return this.var_java_util_List_java_lang_String__a;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_java_util_List_java_lang_String__a = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n.f;
|
||
|
||
import com.ccnode.codegenerator.n.f.c;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private JComboBox var_javax_swing_JComboBox_a = Lists.newArrayList();
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private List<c> var_java_util_List_com_ccnode_codegenerator_n_f_c__a;
|
||
private XmlFile var_com_intellij_psi_xml_XmlFile_a;
|
||
|
||
public a(@Nullable Project project, List<XmlFile> list) {
|
||
super(project, true);
|
||
this.void_a();
|
||
this.setTitle("choose one xml file");
|
||
for (XmlFile xmlFile : list) {
|
||
c c2 = new c();
|
||
c2.a(xmlFile);
|
||
this.var_javax_swing_JComboBox_a.add(c2);
|
||
}
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
Iterator iterator = this.var_javax_swing_JComboBox_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
c c2 = (c)iterator.next();
|
||
this.var_javax_swing_JComboBox_a.addItem(c2);
|
||
}
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(this.var_javax_swing_JComboBox_a.get(0));
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
c c2 = (c)this.var_javax_swing_JComboBox_a.getSelectedItem();
|
||
this.var_com_intellij_psi_xml_XmlFile_a = c2.a();
|
||
super.doOKAction();
|
||
}
|
||
|
||
public XmlFile com_intellij_psi_xml_XmlFile_a() {
|
||
return this.var_com_intellij_psi_xml_XmlFile_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 0, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlFile
|
||
*/
|
||
package com.ccnode.codegenerator.n.f;
|
||
|
||
import com.intellij.psi.xml.XmlFile;
|
||
|
||
public class b {
|
||
private XmlFile a;
|
||
|
||
public XmlFile a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(XmlFile xmlFile) {
|
||
this.a = xmlFile;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlFile
|
||
*/
|
||
package com.ccnode.codegenerator.n.f;
|
||
|
||
import com.intellij.psi.xml.XmlFile;
|
||
|
||
public class c {
|
||
private XmlFile a;
|
||
|
||
public String toString() {
|
||
return this.a.getDocument().getContainingFile().getVirtualFile().getPath().toString();
|
||
}
|
||
|
||
public XmlFile a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(XmlFile xmlFile) {
|
||
this.a = xmlFile;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.n.a.b;
|
||
import java.awt.Component;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.swing.DefaultCellEditor;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JTable;
|
||
|
||
public class t
|
||
extends DefaultCellEditor {
|
||
private Map<Integer, String[]> a = new HashMap<Integer, String[]>();
|
||
private Map<String, List<b>> b;
|
||
|
||
public t(JComboBox jComboBox, Map<String, List<b>> map) {
|
||
super(jComboBox);
|
||
this.b = map;
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellEditorComponent(JTable jTable, Object object, boolean bl, int n2, int n3) {
|
||
JComboBox jComboBox = (JComboBox)this.editorComponent;
|
||
jComboBox.removeAllItems();
|
||
if (this.a.get(n2) == null) {
|
||
Object object2 = jTable.getValueAt(n2, 0);
|
||
List<b> list = this.b.get(object2);
|
||
for (b b3 : list) {
|
||
jComboBox.addItem(b3.java_lang_String_a());
|
||
}
|
||
this.a.put(n2, (String[])list.stream().map(b2 -> b2.java_lang_String_a()).toArray(String[]::new));
|
||
} else {
|
||
for (String string : this.a.get(n2)) {
|
||
jComboBox.addItem(string);
|
||
}
|
||
}
|
||
return super.getTableCellEditorComponent(jTable, object, bl, n2, n3);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.n.a.b;
|
||
import java.awt.Component;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JTable;
|
||
import javax.swing.table.TableCellRenderer;
|
||
|
||
public class u
|
||
implements TableCellRenderer {
|
||
private Map<Integer, JComboBox> a = new HashMap<Integer, JComboBox>();
|
||
private Map<String, List<b>> b;
|
||
|
||
public u(Map<String, List<b>> map) {
|
||
this.b = map;
|
||
}
|
||
|
||
@Override
|
||
public Component getTableCellRendererComponent(JTable jTable, Object object, boolean bl, boolean bl2, int n2, int n3) {
|
||
JComboBox jComboBox;
|
||
if (this.a.get(n2) == null) {
|
||
jComboBox = new JComboBox();
|
||
Object object2 = jTable.getValueAt(n2, 0);
|
||
List<b> list = this.b.get(object2);
|
||
for (b b2 : list) {
|
||
jComboBox.addItem(b2.java_lang_String_a());
|
||
}
|
||
this.a.put(n2, jComboBox);
|
||
}
|
||
jComboBox = this.a.get(n2);
|
||
if (object != null) {
|
||
jComboBox.setSelectedItem(object);
|
||
}
|
||
return jComboBox;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.ad.y;
|
||
import com.ccnode.codegenerator.n.a;
|
||
import com.ccnode.codegenerator.n.b;
|
||
import com.ccnode.codegenerator.n.g;
|
||
import com.ccnode.codegenerator.n.h;
|
||
import com.ccnode.codegenerator.n.t;
|
||
import com.ccnode.codegenerator.n.u;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.awt.Dimension;
|
||
import java.util.ArrayList;
|
||
import java.util.Comparator;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.stream.Collectors;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JTable;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
class v
|
||
extends JTable {
|
||
public static final String var_java_lang_String_a = "unique";
|
||
public static final String var_java_lang_String_b = "filed";
|
||
public static final String var_java_lang_String_c = "columnName";
|
||
public static final String var_java_lang_String_d = "type";
|
||
public static final String var_java_lang_String_e = "primary";
|
||
public static final String var_java_lang_String_f = "length";
|
||
public static final String var_java_lang_String_g = "canBeNull";
|
||
public static final String var_java_lang_String_h = "hasDefaultValue";
|
||
public static final String var_java_lang_String_i = "defaultValue";
|
||
public static final String var_java_lang_String_j = "index";
|
||
public static final String var_java_lang_String_k = "comment";
|
||
public static final int var_int_a = 0;
|
||
public static final int var_int_b = 1;
|
||
public static final int var_int_c = 2;
|
||
public static final int var_int_d = 3;
|
||
public static final int var_int_e = 4;
|
||
public static final int var_int_f = 5;
|
||
public static final int var_int_g = 6;
|
||
public static final int var_int_h = 7;
|
||
public static final int var_int_i = 8;
|
||
public static final int var_int_j = 9;
|
||
public static final int var_int_k = 10;
|
||
public static String[] var_java_lang_String_arr_a;
|
||
private Map<String, List<com.ccnode.codegenerator.n.a.b>> var_java_util_Map_java_lang_String,_java_util_List_com_ccnode_codegenerator_n_a_b___a;
|
||
|
||
public v(List<com.ccnode.codegenerator.n.a.a> list, Project project) {
|
||
super(v.a(list, com.ccnode.codegenerator.ag.e.b.a(project)), var_java_lang_String_arr_a);
|
||
this.var_java_lang_String_a = com.ccnode.codegenerator.n.g.a(list, com.ccnode.codegenerator.ag.e.b.a(project));
|
||
this.getTableHeader().setReorderingAllowed(false);
|
||
this.getColumn(var_java_lang_String_a).setCellRenderer(new b());
|
||
this.getColumn(var_java_lang_String_a).setCellEditor(new a(new JCheckBox()));
|
||
this.getColumn(var_java_lang_String_e).setCellRenderer(new b());
|
||
this.getColumn(var_java_lang_String_e).setCellEditor(new a(new JCheckBox()));
|
||
this.getColumn(var_java_lang_String_g).setCellRenderer(new b());
|
||
this.getColumn(var_java_lang_String_g).setCellEditor(new a(new JCheckBox()));
|
||
this.getColumn(var_java_lang_String_h).setCellRenderer(new b());
|
||
this.getColumn(var_java_lang_String_h).setCellEditor(new a(new JCheckBox()));
|
||
this.getColumn(var_java_lang_String_j).setCellRenderer(new b());
|
||
this.getColumn(var_java_lang_String_j).setCellEditor(new a(new JCheckBox()));
|
||
this.getColumn(var_java_lang_String_d).setCellRenderer(new u((Map<String, List<com.ccnode.codegenerator.n.a.b>>)((Object)this.var_java_lang_String_a)));
|
||
this.getColumn(var_java_lang_String_d).setMinWidth(200);
|
||
this.getColumn(var_java_lang_String_d).setCellEditor(new t(new JComboBox(), (Map<String, List<com.ccnode.codegenerator.n.a.b>>)((Object)this.var_java_lang_String_a)));
|
||
this.setRowHeight(25);
|
||
this.setFillsViewportHeight(true);
|
||
this.setAutoResizeMode(4);
|
||
}
|
||
|
||
static Object[][] a(List<com.ccnode.codegenerator.n.a.a> list, String string) {
|
||
ArrayList<Object[]> arrayList = new ArrayList<Object[]>();
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
Object[] objectArray = new Object[var_java_lang_String_arr_a.length];
|
||
com.ccnode.codegenerator.n.a.a a2 = list.get(i2);
|
||
objectArray[0] = a2.b();
|
||
objectArray[1] = v.a(a2);
|
||
com.ccnode.codegenerator.n.a.b b2 = com.ccnode.codegenerator.l.b.a(string).com_ccnode_codegenerator_l_a_e_a().a(a2.com_intellij_psi_PsiField_a()).stream().min(Comparator.comparingInt(com.ccnode.codegenerator.n.a.b::a)).get();
|
||
if (b2 == null) continue;
|
||
objectArray[2] = b2.java_lang_String_a();
|
||
objectArray[3] = b2.java_lang_String_b();
|
||
objectArray[4] = b2.e();
|
||
objectArray[5] = b2.java_lang_Boolean_c();
|
||
objectArray[6] = b2.d();
|
||
objectArray[8] = b2.java_lang_String_c();
|
||
objectArray[7] = b2.java_lang_Boolean_b();
|
||
objectArray[9] = b2.java_lang_Boolean_a();
|
||
objectArray[10] = a2.java_lang_String_a();
|
||
arrayList.add(objectArray);
|
||
}
|
||
Object[][] objectArray = new Object[arrayList.size()][];
|
||
arrayList.toArray((T[])objectArray);
|
||
return objectArray;
|
||
}
|
||
|
||
public static Object a(com.ccnode.codegenerator.n.a.a a2) {
|
||
String string = y.java_lang_String_a(a2.com_intellij_psi_PsiField_a());
|
||
if (string != null) {
|
||
return string;
|
||
}
|
||
return n.e(a2.b());
|
||
}
|
||
|
||
static Boolean java_lang_Boolean_a(Object object) {
|
||
if (object == null) {
|
||
return false;
|
||
}
|
||
if (!(object instanceof Boolean)) {
|
||
return false;
|
||
}
|
||
return (Boolean)object;
|
||
}
|
||
|
||
static String java_lang_String_a(Object object) {
|
||
if (object == null) {
|
||
return "";
|
||
}
|
||
if (!(object instanceof String)) {
|
||
throw new com.ccnode.codegenerator.n.c.a();
|
||
}
|
||
return ((String)object).trim();
|
||
}
|
||
|
||
@NotNull
|
||
static h a(int n2, JTable jTable, String string) {
|
||
h h2 = new h();
|
||
Object object = jTable.getValueAt(n2, 0);
|
||
h2.c(v.java_lang_String_a(object));
|
||
Object object2 = jTable.getValueAt(n2, 1);
|
||
h2.d(v.java_lang_String_a(object2));
|
||
Object object3 = jTable.getValueAt(n2, 2);
|
||
h2.f(v.java_lang_String_a(object3));
|
||
h2.a(com.ccnode.codegenerator.l.a.f.a.var_com_ccnode_codegenerator_l_a_f_a_a.a(h2.f(), string));
|
||
Object object4 = jTable.getValueAt(n2, 3);
|
||
h2.e(v.java_lang_String_a(object4));
|
||
Object object5 = jTable.getValueAt(n2, 4);
|
||
h2.e(v.java_lang_Boolean_a(object5));
|
||
Object object6 = jTable.getValueAt(n2, 5);
|
||
h2.d(v.java_lang_Boolean_a(object6));
|
||
Object object7 = jTable.getValueAt(n2, 6);
|
||
h2.c(v.java_lang_Boolean_a(object7));
|
||
Object object8 = jTable.getValueAt(n2, 7);
|
||
h2.b(v.java_lang_Boolean_a(object8));
|
||
Object object9 = jTable.getValueAt(n2, 9);
|
||
h2.a(v.java_lang_Boolean_a(object9));
|
||
Object object10 = jTable.getValueAt(n2, 8);
|
||
h2.g(v.java_lang_String_a(object10));
|
||
Object object11 = jTable.getValueAt(n2, 10);
|
||
h2.b(v.java_lang_String_a(object11));
|
||
return h2;
|
||
}
|
||
|
||
@Override
|
||
public Dimension getPreferredScrollableViewportSize() {
|
||
int n2 = this.getTableHeader().getPreferredSize().height;
|
||
int n3 = n2 + 10 * this.getRowHeight();
|
||
int n4 = this.getPreferredSize().width;
|
||
return new Dimension(n4, n3);
|
||
}
|
||
|
||
@Override
|
||
public boolean isCellEditable(int n2, int n3) {
|
||
return n3 != 0;
|
||
}
|
||
|
||
@Override
|
||
public void setValueAt(Object object, int n2, int n3) {
|
||
Object object2;
|
||
super.setValueAt(object, n2, n3);
|
||
if (n3 == 2) {
|
||
object2 = (List)this.var_java_lang_String_a.get(this.getValueAt(n2, 0));
|
||
List list = object2.stream().filter(b2 -> b2.java_lang_String_a().equals((String)object)).collect(Collectors.toList());
|
||
if (list == null || list.size() == 0) {
|
||
super.setValueAt(null, n2, 3);
|
||
super.setValueAt(null, n2, 8);
|
||
} else {
|
||
com.ccnode.codegenerator.n.a.b b3 = (com.ccnode.codegenerator.n.a.b)list.get(0);
|
||
super.setValueAt(b3.java_lang_String_b(), n2, 3);
|
||
super.setValueAt(b3.java_lang_String_c(), n2, 8);
|
||
}
|
||
}
|
||
if (n3 == 5 && object instanceof Boolean) {
|
||
object2 = (Boolean)object;
|
||
if (((Boolean)object2).booleanValue()) {
|
||
for (int i2 = 0; i2 < this.getRowCount(); ++i2) {
|
||
if (i2 == n2) continue;
|
||
super.setValueAt(false, i2, n3);
|
||
}
|
||
super.setValueAt(false, n2, 7);
|
||
super.setValueAt(false, n2, 6);
|
||
super.setValueAt(false, n2, 9);
|
||
} else {
|
||
super.setValueAt(true, n2, 7);
|
||
}
|
||
}
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_arr_a = new String[]{var_java_lang_String_b, var_java_lang_String_c, var_java_lang_String_d, var_java_lang_String_f, var_java_lang_String_a, var_java_lang_String_e, var_java_lang_String_g, var_java_lang_String_h, var_java_lang_String_i, var_java_lang_String_j, var_java_lang_String_k};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.Insets;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class w
|
||
extends DialogWrapper {
|
||
private String var_java_lang_String_a;
|
||
private Integer var_java_lang_Integer_a;
|
||
private Integer var_java_lang_Integer_b;
|
||
private String var_java_lang_String_b;
|
||
|
||
public w(@Nullable Project project, String string, Integer n2, Integer n3, String string2) {
|
||
super(project, true);
|
||
this.var_java_lang_String_a = string;
|
||
this.var_java_lang_Integer_a = n2;
|
||
this.var_java_lang_Integer_b = n3;
|
||
this.var_java_lang_String_b = string2;
|
||
this.setTitle("parse methodname catch exception");
|
||
this.setOKActionEnabled(false);
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.anchor = 17;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
|
||
if (this.var_java_lang_Integer_a != null && this.var_java_lang_Integer_b != null) {
|
||
jPanel.add((Component)new JLabel("methodname: " + this.var_java_lang_String_a.substring(0, this.var_java_lang_Integer_a)), gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JLabel jLabel = new JLabel(this.var_java_lang_String_a.substring(this.var_java_lang_Integer_a, this.var_java_lang_Integer_b));
|
||
jLabel.setForeground(Color.RED);
|
||
jLabel.setOpaque(true);
|
||
jPanel.add((Component)jLabel, gridBagConstraints);
|
||
gridBagConstraints.gridx = 2;
|
||
jPanel.add((Component)new JLabel(this.var_java_lang_String_a.substring(this.var_java_lang_Integer_b)), gridBagConstraints);
|
||
} else {
|
||
jPanel.add((Component)new JLabel("methodname: " + this.var_java_lang_String_a), gridBagConstraints);
|
||
}
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 1;
|
||
jPanel.add((Component)new JLabel(this.var_java_lang_String_b), gridBagConstraints);
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
public final class x
|
||
extends Enum<x> {
|
||
public static final /* enum */ x var_com_ccnode_codegenerator_n_x_a;
|
||
public static final /* enum */ x b;
|
||
public static final /* enum */ x c;
|
||
public static final /* enum */ x d;
|
||
public static final /* enum */ x e;
|
||
public static final /* enum */ x f;
|
||
public static final /* enum */ x g;
|
||
public static final /* enum */ x h;
|
||
public static final /* enum */ x i;
|
||
public static final /* enum */ x j;
|
||
public static final /* enum */ x k;
|
||
public static final /* enum */ x l;
|
||
public static final /* enum */ x m;
|
||
public static final /* enum */ x n;
|
||
public static final /* enum */ x o;
|
||
public static final /* enum */ x p;
|
||
private static final /* synthetic */ x[] var_com_ccnode_codegenerator_n_x_arr_a;
|
||
|
||
public static x[] a() {
|
||
return (x[])var_com_ccnode_codegenerator_n_x_arr_a.clone();
|
||
}
|
||
|
||
public static x a(String string) {
|
||
return Enum.valueOf(x.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ x[] b() {
|
||
return new x[]{var_com_ccnode_codegenerator_n_x_a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_n_x_a = new x();
|
||
b = new x();
|
||
c = new x();
|
||
d = new x();
|
||
e = new x();
|
||
f = new x();
|
||
g = new x();
|
||
h = new x();
|
||
i = new x();
|
||
j = new x();
|
||
k = new x();
|
||
l = new x();
|
||
m = new x();
|
||
n = new x();
|
||
o = new x();
|
||
p = new x();
|
||
var_com_ccnode_codegenerator_n_x_arr_a = x.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import javax.swing.JTextField;
|
||
|
||
public class y {
|
||
private String var_java_lang_String_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public JTextField javax_swing_JTextField_a() {
|
||
return this.var_javax_swing_JTextField_a;
|
||
}
|
||
|
||
public void a(JTextField jTextField) {
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.fileChooser.FileChooser
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptor
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.openapi.vfs.VirtualFileManager
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiMethod
|
||
* com.intellij.psi.PsiParameter
|
||
* com.intellij.psi.xml.XmlDocument
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.Consumer
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.apache.commons.lang3.Validate
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.k;
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.freemarker.dto.ColumnAndFieldAndJdbcType;
|
||
import com.ccnode.codegenerator.n.b.a;
|
||
import com.ccnode.codegenerator.n.b.a.b;
|
||
import com.ccnode.codegenerator.n.b.a.c;
|
||
import com.ccnode.codegenerator.n.b.a.d;
|
||
import com.ccnode.codegenerator.n.b.a.e;
|
||
import com.ccnode.codegenerator.n.b.a.f;
|
||
import com.ccnode.codegenerator.n.b.a.g;
|
||
import com.ccnode.codegenerator.n.b.a.h;
|
||
import com.ccnode.codegenerator.n.b.a.i;
|
||
import com.ccnode.codegenerator.n.l;
|
||
import com.ccnode.codegenerator.n.m;
|
||
import com.ccnode.codegenerator.n.q;
|
||
import com.ccnode.codegenerator.n.v;
|
||
import com.ccnode.codegenerator.q.e_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.fileChooser.FileChooser;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiMethod;
|
||
import com.intellij.psi.PsiParameter;
|
||
import com.intellij.psi.xml.XmlDocument;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.Consumer;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.IOException;
|
||
import java.nio.file.Files;
|
||
import java.nio.file.Paths;
|
||
import java.nio.file.StandardOpenOption;
|
||
import java.util.ArrayList;
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.HashSet;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTable;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.apache.commons.lang3.Validate;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class z
|
||
extends DialogWrapper {
|
||
private static com.ccnode.codegenerator.F.a var_com_ccnode_codegenerator_F_a_a;
|
||
private final Set<String> var_java_util_Set_java_lang_String__a;
|
||
public static final String var_java_lang_String_a = "@Param(\"";
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
private XmlFile var_com_intellij_psi_xml_XmlFile_a;
|
||
private List<com.ccnode.codegenerator.n.a.a> var_java_util_List_com_ccnode_codegenerator_n_a_a__a;
|
||
private List<b> var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b;
|
||
private PsiClass var_com_intellij_psi_PsiClass_b;
|
||
private List<com.ccnode.codegenerator.n.a.a> c;
|
||
private List<ColumnAndFieldAndJdbcType> d;
|
||
private PsiDocumentManager var_com_intellij_psi_PsiDocumentManager_a;
|
||
private XmlDocument var_com_intellij_psi_xml_XmlDocument_a;
|
||
private Document var_com_intellij_openapi_editor_Document_a;
|
||
private String var_java_lang_String_b;
|
||
private a var_com_ccnode_codegenerator_n_b_a_a;
|
||
private JTable var_javax_swing_JTable_a;
|
||
private JLabel var_javax_swing_JLabel_a;
|
||
private JLabel var_javax_swing_JLabel_b;
|
||
private JRadioButton var_javax_swing_JRadioButton_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private List<d> e;
|
||
private List<c> f;
|
||
private List<e> g;
|
||
|
||
protected void doOKAction() {
|
||
com.ccnode.codegenerator.n.h h2;
|
||
try {
|
||
this.void_a();
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)exception.getMessage(), (String)"validate fail");
|
||
return;
|
||
}
|
||
ArrayList<com.ccnode.codegenerator.n.h> arrayList = new ArrayList<com.ccnode.codegenerator.n.h>();
|
||
for (int i2 = 0; i2 < this.var_com_ccnode_codegenerator_F_a_a.size(); ++i2) {
|
||
h2 = v.a(i2, this.var_javax_swing_JTable_a, com.ccnode.codegenerator.ag.e.b.a(this.var_com_intellij_openapi_project_Project_a));
|
||
arrayList.add(h2);
|
||
}
|
||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a);
|
||
h2 = this.var_com_intellij_psi_xml_XmlFile_a.getDocument();
|
||
String string = com.ccnode.codegenerator.ag.e.b.a(this.var_com_intellij_openapi_project_Project_a);
|
||
List<ColumnAndFieldAndJdbcType> list = z.a(this.d, arrayList, this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b, string);
|
||
this.e.forEach(d2 -> {
|
||
if (d2.javax_swing_JCheckBox_a().isSelected()) {
|
||
this.a((List<com.ccnode.codegenerator.n.h>)arrayList, this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b, d2.com_ccnode_codegenerator_n_b_a_i_a());
|
||
}
|
||
});
|
||
this.f.forEach(c2 -> {
|
||
if (c2.javax_swing_JCheckBox_a().isSelected()) {
|
||
String string = com.ccnode.codegenerator.ag.e.b.a(this.var_com_intellij_openapi_project_Project_a);
|
||
this.a((List<com.ccnode.codegenerator.n.h>)arrayList, this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b, c2.com_ccnode_codegenerator_n_b_a_h_a(), string);
|
||
}
|
||
});
|
||
String string2 = this.java_lang_String_a();
|
||
this.g.forEach(e2 -> {
|
||
if (e2.javax_swing_JCheckBox_a().isSelected()) {
|
||
this.a(this.var_com_intellij_psi_PsiClass_a, list, string2, e2.com_ccnode_codegenerator_n_b_a_f_a(), e2.com_ccnode_codegenerator_n_b_a_a_a(), psiDocumentManager);
|
||
}
|
||
});
|
||
if (this.var_javax_swing_JRadioButton_a.isSelected()) {
|
||
ArrayList<String> arrayList2 = new ArrayList<String>();
|
||
String string3 = this.a(arrayList, string2, this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b);
|
||
arrayList2.add(string3);
|
||
String string4 = this.var_javax_swing_JTextField_a.getText().trim();
|
||
String string5 = this.var_javax_swing_JTextField_b.getText().trim();
|
||
try {
|
||
String string6 = string5 + "/" + string4;
|
||
Files.write(Paths.get(string6, new String[0]), arrayList2, StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
||
}
|
||
catch (IOException iOException) {
|
||
throw new RuntimeException("can't write file " + string4 + " to path " + string5 + "/" + string4);
|
||
}
|
||
}
|
||
VirtualFileManager.getInstance().syncRefresh();
|
||
Messages.showMessageDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"generate files success", (String)"success", (Icon)Messages.getInformationIcon());
|
||
var_com_ccnode_codegenerator_F_a_a.a("user is using update field");
|
||
super.doOKAction();
|
||
}
|
||
|
||
private String a(List<com.ccnode.codegenerator.n.h> list, String string, List<b> list2) {
|
||
String string2 = com.ccnode.codegenerator.ag.e.b.a(this.var_com_intellij_openapi_project_Project_a);
|
||
return com.ccnode.codegenerator.l.b.a(string2).com_ccnode_codegenerator_l_a_l_a().a(list, string, list2);
|
||
}
|
||
|
||
private static List<ColumnAndFieldAndJdbcType> a(List<ColumnAndFieldAndJdbcType> list, List<com.ccnode.codegenerator.n.h> list2, List<b> list3, String string) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
boolean bl = false;
|
||
for (ColumnAndFieldAndJdbcType object : list) {
|
||
for (b b2 : list3) {
|
||
if (!b2.getField().equals(object.getField())) continue;
|
||
bl = true;
|
||
break;
|
||
}
|
||
if (bl) continue;
|
||
arrayList.add(object);
|
||
}
|
||
for (com.ccnode.codegenerator.n.h h2 : list2) {
|
||
ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType = new ColumnAndFieldAndJdbcType();
|
||
columnAndFieldAndJdbcType.setColumn(h2.java_lang_String_d());
|
||
columnAndFieldAndJdbcType.setJdbcType(h2.java_lang_String_a());
|
||
columnAndFieldAndJdbcType.setField(h2.java_lang_String_c());
|
||
arrayList.add(columnAndFieldAndJdbcType);
|
||
}
|
||
for (ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType : arrayList) {
|
||
columnAndFieldAndJdbcType.setColumn(com.ccnode.codegenerator.l.b.a(columnAndFieldAndJdbcType.getColumn(), string));
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
private String java_lang_String_a() {
|
||
String string = "";
|
||
for (XmlTag xmlTag : this.var_com_intellij_psi_xml_XmlFile_a.getRootTag().getSubTags()) {
|
||
String string2;
|
||
if (!"insert".equalsIgnoreCase(xmlTag.getName()) || (string = q.a(string2 = xmlTag.getValue().getText())) == null) continue;
|
||
return string;
|
||
}
|
||
return string;
|
||
}
|
||
|
||
private void a(PsiClass psiClass, List<ColumnAndFieldAndJdbcType> list, String string, f f2, com.ccnode.codegenerator.n.b.a.a a2, PsiDocumentManager psiDocumentManager) {
|
||
String string2 = f2.com_intellij_psi_xml_XmlTag_a().getValue().getText();
|
||
m m2 = new m(string2, list, string, f2.com_ccnode_codegenerator_n_b_a_g_a(), a2, psiClass.getName(), com.ccnode.codegenerator.ag.e.b.a(psiClass.getProject()));
|
||
String string3 = q.a(m2);
|
||
if (StringUtils.isBlank((CharSequence)string3)) {
|
||
return;
|
||
}
|
||
String string4 = string3;
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, () -> {
|
||
TextRange textRange = f2.com_intellij_psi_xml_XmlTag_a().getValue().getTextRange();
|
||
XmlTag xmlTag = d_0.var_com_ccnode_codegenerator_ad_d_0_a.com_intellij_psi_xml_XmlTag_a(this.var_com_intellij_psi_xml_XmlFile_a, f2.com_intellij_psi_xml_XmlTag_a().getName());
|
||
Document document = psiDocumentManager.getDocument((PsiFile)this.var_com_intellij_psi_xml_XmlFile_a);
|
||
String string2 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.b(f2.com_intellij_psi_xml_XmlTag_a().getValue().getText(), string4);
|
||
document.replaceString(textRange.getStartOffset(), textRange.getEndOffset(), (CharSequence)string2);
|
||
psiDocumentManager.commitDocument(document);
|
||
});
|
||
}
|
||
|
||
private void a(List<com.ccnode.codegenerator.n.h> list, List<b> list2, h h2, String string) {
|
||
String string2 = h2.com_intellij_psi_xml_XmlTag_a().getValue().getText();
|
||
String string3 = q.a(list, list2, string2, this.d, string);
|
||
if (string3 == null) {
|
||
return;
|
||
}
|
||
String string4 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.b(string2, string3);
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, () -> {
|
||
TextRange textRange = h2.com_intellij_psi_xml_XmlTag_a().getValue().getTextRange();
|
||
this.var_com_intellij_openapi_editor_Document_a.replaceString(textRange.getStartOffset(), textRange.getEndOffset(), (CharSequence)string4);
|
||
this.var_com_intellij_psi_PsiDocumentManager_a.commitDocument(this.var_com_intellij_openapi_editor_Document_a);
|
||
});
|
||
}
|
||
|
||
private void a(List<com.ccnode.codegenerator.n.h> list, List<b> list2, i i2) {
|
||
for (XmlTag xmlTag : i2.com_intellij_psi_xml_XmlTag_a().getSubTags()) {
|
||
String string = xmlTag.getAttributeValue("property");
|
||
if (!StringUtils.isNotBlank((CharSequence)string)) continue;
|
||
for (b b2 : list2) {
|
||
if (!string.equalsIgnoreCase(b2.getField())) continue;
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, () -> xmlTag.delete());
|
||
}
|
||
}
|
||
for (com.ccnode.codegenerator.n.h h2 : list) {
|
||
XmlTag xmlTag = i2.com_intellij_psi_xml_XmlTag_a().createChildTag("result", "", null, false);
|
||
xmlTag.setAttribute("column", h2.java_lang_String_d());
|
||
xmlTag.setAttribute("property", h2.java_lang_String_c());
|
||
xmlTag.setAttribute("jdbcType", h2.java_lang_String_a());
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, () -> i2.com_intellij_psi_xml_XmlTag_a().addSubTag(xmlTag, false));
|
||
}
|
||
}
|
||
|
||
private void void_a() {
|
||
for (int i2 = 0; i2 < this.var_com_ccnode_codegenerator_F_a_a.size(); ++i2) {
|
||
Object object = this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string = "column name is empty on row " + i2;
|
||
Validate.notNull((Object)object, (String)string, (Object[])new Object[0]);
|
||
if (!(object instanceof String)) {
|
||
throw new RuntimeException(string);
|
||
}
|
||
Validate.notBlank((CharSequence)((String)object), (String)string, (Object[])new Object[0]);
|
||
}
|
||
if (this.var_javax_swing_JRadioButton_a.isSelected()) {
|
||
Validate.notBlank((CharSequence)this.var_javax_swing_JTextField_a.getText(), (String)"sql name is empty", (Object[])new Object[0]);
|
||
Validate.notBlank((CharSequence)this.var_javax_swing_JTextField_b.getText(), (String)"sql path is empty", (Object[])new Object[0]);
|
||
}
|
||
}
|
||
|
||
public z(Project project, PsiClass psiClass, XmlFile xmlFile, PsiClass psiClass2, List<PsiField> list) {
|
||
super(project, true);
|
||
this.var_com_ccnode_codegenerator_F_a_a = Sets.newHashSet((Object[])new String[]{com.ccnode.codegenerator.q.b.var_com_ccnode_codegenerator_q_b_a.name(), com.ccnode.codegenerator.q.b.b.name(), com.ccnode.codegenerator.q.b.d.name(), com.ccnode.codegenerator.q.b.c.name(), com.ccnode.codegenerator.q.b.f.name(), com.ccnode.codegenerator.q.b.e.name()});
|
||
this.var_javax_swing_JLabel_a = new JLabel("sql file name:");
|
||
this.var_javax_swing_JLabel_b = new JLabel("sql file path:");
|
||
this.var_javax_swing_JRadioButton_a = new JRadioButton("generate updated sql", true);
|
||
this.var_javax_swing_JButton_a = new JButton("open folder");
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.var_com_intellij_psi_xml_XmlFile_a = xmlFile;
|
||
this.var_com_intellij_psi_PsiClass_b = psiClass2;
|
||
this.c = t_0.var_com_ccnode_codegenerator_ad_t_0_a.a((List<? extends PsiField>)list);
|
||
this.b();
|
||
this.var_javax_swing_JTextField_a = new JTextField(psiClass.getName() + "_update_" + k.c(new Date()) + ".sql");
|
||
this.var_javax_swing_JTextField_b = new JTextField(this.var_com_intellij_psi_PsiClass_a.getContainingFile().getVirtualFile().getParent().getPath());
|
||
this.var_com_intellij_psi_PsiDocumentManager_a = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_intellij_psi_xml_XmlDocument_a = this.var_com_intellij_psi_xml_XmlFile_a.getDocument();
|
||
this.var_com_intellij_openapi_editor_Document_a = this.var_com_intellij_psi_PsiDocumentManager_a.getDocument((PsiFile)xmlFile);
|
||
this.setTitle("update mapper xml");
|
||
this.init();
|
||
}
|
||
|
||
private void b() {
|
||
this.var_com_ccnode_codegenerator_n_b_a_a = this.com_ccnode_codegenerator_n_b_a_a();
|
||
this.d();
|
||
if (this.var_com_ccnode_codegenerator_F_a_a.size() == 0 && this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b.size() == 0) {
|
||
this.var_java_lang_String_b = "there is no field to update or add, please check again with your resultMap";
|
||
return;
|
||
}
|
||
this.var_javax_swing_JTable_a = new v((List)((Object)this.var_com_ccnode_codegenerator_F_a_a), this.var_com_intellij_openapi_project_Project_a){
|
||
|
||
@Override
|
||
public boolean isCellEditable(int n2, int n3) {
|
||
return super.isCellEditable(n2, n3) && n3 != 5;
|
||
}
|
||
};
|
||
this.c();
|
||
}
|
||
|
||
private void c() {
|
||
PsiMethod[] psiMethodArray;
|
||
this.e = new ArrayList<d>();
|
||
this.var_com_ccnode_codegenerator_n_b_a_a.a().forEach(i2 -> {
|
||
d d2 = new d();
|
||
d2.a(new JCheckBox("resultMap id=" + i2.java_lang_String_a(), true));
|
||
d2.a((i)i2);
|
||
this.e.add(d2);
|
||
});
|
||
this.f = new ArrayList<c>();
|
||
this.var_com_ccnode_codegenerator_n_b_a_a.b().forEach(h2 -> {
|
||
XmlTag xmlTag = h2.com_intellij_psi_xml_XmlTag_a();
|
||
String string = xmlTag.getValue().getText();
|
||
boolean bl = false;
|
||
for (ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType : this.d) {
|
||
if (!string.contains(columnAndFieldAndJdbcType.getColumn())) continue;
|
||
bl = true;
|
||
break;
|
||
}
|
||
if (bl) {
|
||
c c2 = new c();
|
||
c2.a((h)h2);
|
||
c2.a(new JCheckBox("sql id=" + h2.java_lang_String_a(), true));
|
||
this.f.add(c2);
|
||
}
|
||
});
|
||
this.g = new ArrayList<e>();
|
||
ArrayList<com.ccnode.codegenerator.n.b.a.a> arrayList = new ArrayList<com.ccnode.codegenerator.n.b.a.a>();
|
||
block0: for (PsiMethod psiMethod : psiMethodArray = this.var_com_intellij_psi_PsiClass_b.getAllMethods()) {
|
||
PsiParameter[] psiParameterArray;
|
||
for (PsiParameter psiParameter : psiParameterArray = psiMethod.getParameterList().getParameters()) {
|
||
String string = psiParameter.getType().getCanonicalText();
|
||
if (!string.contains(this.var_com_intellij_psi_PsiClass_a.getQualifiedName())) continue;
|
||
com.ccnode.codegenerator.n.b.a.a a3 = new com.ccnode.codegenerator.n.b.a.a();
|
||
a3.a(psiMethod.getName());
|
||
if (string.startsWith("java.util")) {
|
||
a3.a(true);
|
||
}
|
||
if (psiParameter.getText().startsWith(var_java_lang_String_a)) {
|
||
a3.b(this.a(psiParameter.getText()));
|
||
}
|
||
arrayList.add(a3);
|
||
continue block0;
|
||
}
|
||
}
|
||
arrayList.forEach(a2 -> {
|
||
f f2 = this.var_com_ccnode_codegenerator_n_b_a_a.a().get(a2.java_lang_String_a());
|
||
if (f2 != null && this.var_com_ccnode_codegenerator_F_a_a.contains(a2.java_lang_String_a())) {
|
||
e e2 = new e();
|
||
e2.a(new JCheckBox("replace " + f2.com_ccnode_codegenerator_n_b_a_g_a().name() + " mapper id " + a2.java_lang_String_a(), true));
|
||
e2.a((com.ccnode.codegenerator.n.b.a.a)a2);
|
||
e2.a(f2);
|
||
this.g.add(e2);
|
||
}
|
||
});
|
||
}
|
||
|
||
private String a(String string) {
|
||
Object object = "";
|
||
for (int i2 = var_java_lang_String_a.length(); string.charAt(i2) != '\"' && i2 < string.length(); ++i2) {
|
||
object = (String)object + string.charAt(i2);
|
||
}
|
||
return object;
|
||
}
|
||
|
||
private void d() {
|
||
this.var_com_ccnode_codegenerator_F_a_a = new ArrayList();
|
||
this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b = new ArrayList<b>();
|
||
HashSet hashSet = new HashSet();
|
||
this.c.forEach(a2 -> hashSet.add(a2.b().toLowerCase()));
|
||
HashSet hashSet2 = new HashSet();
|
||
this.d.forEach(columnAndFieldAndJdbcType -> hashSet2.add(columnAndFieldAndJdbcType.getField().toLowerCase()));
|
||
this.c.forEach(a2 -> {
|
||
if (!hashSet2.contains(a2.b().toLowerCase())) {
|
||
this.var_com_ccnode_codegenerator_F_a_a.add(a2);
|
||
}
|
||
});
|
||
this.d.forEach(columnAndFieldAndJdbcType -> {
|
||
if (!hashSet.contains(columnAndFieldAndJdbcType.getField().toLowerCase())) {
|
||
b b2 = new b();
|
||
b2.setColumn(columnAndFieldAndJdbcType.getColumn());
|
||
b2.setField(columnAndFieldAndJdbcType.getField());
|
||
this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b.add(b2);
|
||
}
|
||
});
|
||
}
|
||
|
||
private a com_ccnode_codegenerator_n_b_a_a() {
|
||
XmlTag[] xmlTagArray = this.var_com_intellij_psi_xml_XmlFile_a.getRootTag().getSubTags();
|
||
a a2 = new a();
|
||
ArrayList<i> arrayList = new ArrayList<i>();
|
||
ArrayList<h> arrayList2 = new ArrayList<h>();
|
||
HashMap<String, f> hashMap = new HashMap<String, f>();
|
||
block16: for (XmlTag object : xmlTagArray) {
|
||
String string = object.getName();
|
||
switch (string) {
|
||
case "resultMap": {
|
||
Object object2 = this.com_ccnode_codegenerator_n_b_a_i_a(object);
|
||
if (((i)object2).b().equals(this.var_com_intellij_psi_PsiClass_a.getQualifiedName())) {
|
||
this.d = this.a(object);
|
||
}
|
||
arrayList.add((i)object2);
|
||
continue block16;
|
||
}
|
||
case "sql": {
|
||
Object object2 = this.com_ccnode_codegenerator_n_b_a_h_a(object);
|
||
arrayList2.add((h)object2);
|
||
continue block16;
|
||
}
|
||
case "insert": {
|
||
Object object2 = this.a(object, com.ccnode.codegenerator.n.b.a.g.var_com_ccnode_codegenerator_n_b_a_g_a);
|
||
String string2 = object.getAttributeValue("id");
|
||
hashMap.put(string2, (f)object2);
|
||
continue block16;
|
||
}
|
||
case "update": {
|
||
Object object2 = this.a(object, com.ccnode.codegenerator.n.b.a.g.b);
|
||
String string2 = object.getAttributeValue("id");
|
||
hashMap.put(string2, (f)object2);
|
||
continue block16;
|
||
}
|
||
case "delete": {
|
||
Object object2 = this.a(object, com.ccnode.codegenerator.n.b.a.g.d);
|
||
String string2 = object.getAttributeValue("id");
|
||
hashMap.put(string2, (f)object2);
|
||
continue block16;
|
||
}
|
||
case "select": {
|
||
Object object2 = this.a(object, com.ccnode.codegenerator.n.b.a.g.c);
|
||
String string2 = object.getAttributeValue("id");
|
||
hashMap.put(string2, (f)object2);
|
||
continue block16;
|
||
}
|
||
}
|
||
}
|
||
if (this.d == null) {
|
||
l l2 = new l(this.var_com_intellij_openapi_project_Project_a, t_0.var_com_ccnode_codegenerator_ad_t_0_a.d(this.var_com_intellij_psi_PsiClass_a), this.var_com_intellij_psi_PsiClass_a);
|
||
int n2 = l2.showAndGet() ? 1 : 0;
|
||
this.d = new ArrayList<ColumnAndFieldAndJdbcType>();
|
||
if (n2 != 0) {
|
||
e_0 e_02 = l2.com_ccnode_codegenerator_q_e_0_a();
|
||
LinkedHashMap<String, String> linkedHashMap = e_02.a();
|
||
for (String string : linkedHashMap.keySet()) {
|
||
ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType = new ColumnAndFieldAndJdbcType();
|
||
columnAndFieldAndJdbcType.setColumn((String)linkedHashMap.get(string));
|
||
columnAndFieldAndJdbcType.setField(string);
|
||
this.d.add(columnAndFieldAndJdbcType);
|
||
}
|
||
}
|
||
}
|
||
a2.a(arrayList);
|
||
a2.a(hashMap);
|
||
a2.b(arrayList2);
|
||
return a2;
|
||
}
|
||
|
||
private f a(XmlTag xmlTag, g g2) {
|
||
f f2 = new f();
|
||
f2.a(g2);
|
||
f2.a(xmlTag);
|
||
return f2;
|
||
}
|
||
|
||
private h com_ccnode_codegenerator_n_b_a_h_a(XmlTag xmlTag) {
|
||
String string = xmlTag.getAttributeValue("id");
|
||
h h2 = new h();
|
||
h2.a(string);
|
||
h2.a(xmlTag);
|
||
return h2;
|
||
}
|
||
|
||
private List<ColumnAndFieldAndJdbcType> a(XmlTag xmlTag) {
|
||
ArrayList<ColumnAndFieldAndJdbcType> arrayList = new ArrayList<ColumnAndFieldAndJdbcType>();
|
||
for (XmlTag xmlTag2 : xmlTag.getSubTags()) {
|
||
String string = xmlTag2.getAttributeValue("property");
|
||
if (!StringUtils.isNotBlank((CharSequence)string)) continue;
|
||
ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType = new ColumnAndFieldAndJdbcType();
|
||
columnAndFieldAndJdbcType.setField(string);
|
||
columnAndFieldAndJdbcType.setColumn(xmlTag2.getAttributeValue("column"));
|
||
columnAndFieldAndJdbcType.setJdbcType(xmlTag2.getAttributeValue("jdbcType"));
|
||
arrayList.add(columnAndFieldAndJdbcType);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
private i com_ccnode_codegenerator_n_b_a_i_a(XmlTag xmlTag) {
|
||
i i2 = new i();
|
||
String string = xmlTag.getAttributeValue("id");
|
||
String string2 = xmlTag.getAttributeValue("type");
|
||
i2.a(string);
|
||
i2.b(string2);
|
||
i2.a(xmlTag);
|
||
return i2;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
if (this.var_java_lang_String_b != null) {
|
||
jPanel.add((Component)new JLabel(this.var_java_lang_String_b), gridBagConstraints);
|
||
this.setOKActionEnabled(false);
|
||
return jPanel;
|
||
}
|
||
gridBagConstraints.anchor = 18;
|
||
gridBagConstraints.fill = 1;
|
||
gridBagConstraints.weighty = 1.0;
|
||
++gridBagConstraints.gridy;
|
||
jPanel.add((Component)new JLabel("the following are new added fields:"), gridBagConstraints);
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
JScrollPane jScrollPane = new JScrollPane(this.var_javax_swing_JTable_a);
|
||
gridBagConstraints.gridwidth = 10;
|
||
gridBagConstraints.weighty = 5.0;
|
||
jPanel.add((Component)jScrollPane, gridBagConstraints);
|
||
gridBagConstraints.weighty = 1.0;
|
||
gridBagConstraints.gridwidth = 1;
|
||
if (this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b.size() > 0) {
|
||
++gridBagConstraints.gridy;
|
||
jPanel.add((Component)new JLabel("the following are deleted fields:"), gridBagConstraints);
|
||
++gridBagConstraints.gridx;
|
||
for (b object : this.var_java_util_List_com_ccnode_codegenerator_n_b_a_b__b) {
|
||
jPanel.add((Component)new JLabel(object.getField()), gridBagConstraints);
|
||
++gridBagConstraints.gridx;
|
||
}
|
||
}
|
||
gridBagConstraints.gridx = 0;
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.insets = new Insets(10, 0, 5, 10);
|
||
jPanel.add((Component)new JLabel("choose the statement you want to update:"), gridBagConstraints);
|
||
gridBagConstraints.insets = new Insets(3, 3, 3, 3);
|
||
++gridBagConstraints.gridy;
|
||
for (d d2 : this.e) {
|
||
++gridBagConstraints.gridy;
|
||
jPanel.add((Component)d2.javax_swing_JCheckBox_a(), gridBagConstraints);
|
||
}
|
||
++gridBagConstraints.gridy;
|
||
for (c c2 : this.f) {
|
||
++gridBagConstraints.gridy;
|
||
jPanel.add((Component)c2.javax_swing_JCheckBox_a(), gridBagConstraints);
|
||
}
|
||
++gridBagConstraints.gridy;
|
||
for (e e2 : this.g) {
|
||
++gridBagConstraints.gridy;
|
||
jPanel.add((Component)e2.javax_swing_JCheckBox_a(), gridBagConstraints);
|
||
}
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.weightx = 0.25;
|
||
jPanel.add((Component)this.var_javax_swing_JRadioButton_a, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
jPanel.add((Component)this.var_javax_swing_JLabel_a, gridBagConstraints);
|
||
gridBagConstraints.gridx = 2;
|
||
gridBagConstraints.weightx = 1.0;
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, gridBagConstraints);
|
||
gridBagConstraints.gridx = 3;
|
||
jPanel.add((Component)this.var_javax_swing_JLabel_b, gridBagConstraints);
|
||
gridBagConstraints.gridx = 4;
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_b, gridBagConstraints);
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||
fileChooserDescriptor.setShowFileSystemRoots(true);
|
||
fileChooserDescriptor.setTitle("Choose a folder...");
|
||
fileChooserDescriptor.setDescription("choose the path to store file");
|
||
fileChooserDescriptor.setHideIgnored(false);
|
||
FileChooser.chooseFiles((FileChooserDescriptor)fileChooserDescriptor, (Project)z.this.var_com_intellij_openapi_project_Project_a, (VirtualFile)z.this.var_com_intellij_openapi_project_Project_a.getBaseDir(), (Consumer)new Consumer<List<VirtualFile>>(){
|
||
|
||
public void a(List<VirtualFile> list) {
|
||
z.this.var_javax_swing_JTextField_b.setText(list.get(0).getPath());
|
||
}
|
||
|
||
public /* synthetic */ void consume(Object object) {
|
||
this.a((List)object);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
gridBagConstraints.gridx = 5;
|
||
jPanel.add((Component)this.var_javax_swing_JButton_a, gridBagConstraints);
|
||
return jPanel;
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_F_a_a = com.ccnode.codegenerator.F.c.var_com_ccnode_codegenerator_F_c_a.a(z.class);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInspection.CommonProblemDescriptor
|
||
* com.intellij.codeInspection.LocalQuickFix
|
||
* com.intellij.codeInspection.ProblemDescriptor
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.options.ShowSettingsUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiJavaFile
|
||
* com.intellij.psi.search.FilenameIndex
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.ad.ac;
|
||
import com.ccnode.codegenerator.i.b_0;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInspection.CommonProblemDescriptor;
|
||
import com.intellij.codeInspection.LocalQuickFix;
|
||
import com.intellij.codeInspection.ProblemDescriptor;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.options.ShowSettingsUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiJavaFile;
|
||
import com.intellij.psi.search.FilenameIndex;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class a
|
||
implements LocalQuickFix {
|
||
private XmlAttribute var_com_intellij_psi_xml_XmlAttribute_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public a(XmlAttribute xmlAttribute, String string) {
|
||
this.var_com_intellij_psi_xml_XmlAttribute_a = xmlAttribute;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
@NotNull
|
||
public String getFamilyName() {
|
||
return "MybatisCodeHelperPro";
|
||
}
|
||
|
||
public void a(@NotNull Project project, @NotNull ProblemDescriptor problemDescriptor) {
|
||
PsiFile[] psiFileArray = FilenameIndex.getFilesByName((Project)project, (String)(this.var_java_lang_String_a + ".java"), (GlobalSearchScope)ac.a.b((PsiElement)this.var_com_intellij_psi_xml_XmlAttribute_a));
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (PsiFile psiFile : psiFileArray) {
|
||
if (!(psiFile instanceof PsiJavaFile)) continue;
|
||
String string = ((PsiJavaFile)psiFile).getPackageName();
|
||
arrayList.add(string);
|
||
}
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_dom_a_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_dom_a_a_a = a2;
|
||
this.var_java_util_List_a = list;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
if (!this.var_java_util_List_a.isEmpty()) {
|
||
String string = Joiner.on((String)"\n").join((Iterable)this.var_java_util_List_a);
|
||
Messages.showInfoMessage((Project)this.var_com_intellij_openapi_project_Project_a, (String)("Found package\n" + string + "\nfor class " + this.var_com_ccnode_codegenerator_dom_a_a_a.var_java_lang_String_a), (String)"Copy package to typeAlias");
|
||
}
|
||
ShowSettingsUtil.getInstance().showSettingsDialog(this.var_com_intellij_openapi_project_Project_a, b_0.class);
|
||
}
|
||
});
|
||
}
|
||
|
||
@NotNull
|
||
public String getName() {
|
||
return "Configure typeAlias";
|
||
}
|
||
|
||
public /* synthetic */ void applyFix(@NotNull Project project, @NotNull CommonProblemDescriptor commonProblemDescriptor) {
|
||
this.a(project, (ProblemDescriptor)commonProblemDescriptor);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.codeInspection.LocalQuickFix
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.util.text.StringUtil
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.psi.xml.XmlElement
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.CustomReferenceConverter
|
||
* com.intellij.util.xml.DomJavaUtil
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* com.intellij.util.xml.PsiClassConverter
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NonNls
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.ad.ac;
|
||
import com.ccnode.codegenerator.ad.f_0;
|
||
import com.ccnode.codegenerator.dom.a.a;
|
||
import com.ccnode.codegenerator.dom.a.c;
|
||
import com.intellij.codeInspection.LocalQuickFix;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.util.text.StringUtil;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.psi.xml.XmlElement;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.CustomReferenceConverter;
|
||
import com.intellij.util.xml.DomJavaUtil;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import com.intellij.util.xml.PsiClassConverter;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NonNls;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class b
|
||
extends c<PsiClass>
|
||
implements CustomReferenceConverter<PsiClass> {
|
||
private PsiClassConverter a = new PsiClassConverter();
|
||
|
||
@Nullable
|
||
public PsiClass a(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
if (StringUtil.isEmptyOrSpaces((String)string)) {
|
||
return null;
|
||
}
|
||
if (!string.contains(f_0.var_java_lang_String_a)) {
|
||
return (PsiClass)com.ccnode.codegenerator.c.c.a(convertContext.getProject()).a((PsiElement)convertContext.getXmlElement(), string).orNull();
|
||
}
|
||
return DomJavaUtil.findClass((String)string.trim(), (PsiFile)convertContext.getFile(), (Module)convertContext.getModule(), (GlobalSearchScope)ac.a.b((PsiElement)convertContext.getXmlElement()));
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@Nullable PsiClass psiClass, ConvertContext convertContext) {
|
||
return this.a.toString(psiClass, convertContext);
|
||
}
|
||
|
||
@NotNull
|
||
public PsiReference[] createReferences(GenericDomValue<PsiClass> genericDomValue, PsiElement psiElement, ConvertContext convertContext) {
|
||
if (((XmlAttributeValue)psiElement).getValue().contains(f_0.var_java_lang_String_a)) {
|
||
return this.a.createReferences(genericDomValue, psiElement, convertContext);
|
||
}
|
||
return new PsiReference[]{new com.ccnode.codegenerator.c.a((XmlAttributeValue)psiElement)};
|
||
}
|
||
|
||
public LocalQuickFix[] getQuickFixes(ConvertContext convertContext) {
|
||
String[] stringArray;
|
||
XmlAttribute xmlAttribute;
|
||
String string;
|
||
XmlElement xmlElement = convertContext.getXmlElement();
|
||
boolean bl = xmlElement instanceof XmlAttribute;
|
||
if (bl && StringUtils.isNotBlank((CharSequence)(string = (xmlAttribute = (XmlAttribute)xmlElement).getValue())) && (stringArray = string.split("\\.")).length == 1) {
|
||
return new LocalQuickFix[]{new a(xmlAttribute, string)};
|
||
}
|
||
return super.getQuickFixes(convertContext);
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
return this.a(string, convertContext);
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ String toString(@Nullable Object object, ConvertContext convertContext) {
|
||
return this.a((PsiClass)object, convertContext);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.ResolvingConverter
|
||
* org.jetbrains.annotations.NonNls
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.ResolvingConverter;
|
||
import java.util.Collection;
|
||
import java.util.Collections;
|
||
import org.jetbrains.annotations.NonNls;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public abstract class c<T>
|
||
extends ResolvingConverter<T> {
|
||
@NotNull
|
||
public Collection<? extends T> getVariants(ConvertContext convertContext) {
|
||
return Collections.emptyList();
|
||
}
|
||
|
||
@Nullable
|
||
public String toString(@Nullable T t2, ConvertContext convertContext) {
|
||
return null;
|
||
}
|
||
|
||
@Nullable
|
||
public T fromString(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.ElementManipulators
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.PsiReferenceBase
|
||
* com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.psi.xml.XmlElement
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.CustomReferenceConverter
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.DomUtil
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* com.intellij.util.xml.PsiClassConverter
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NonNls
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.ad.f_0;
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.ElementManipulators;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.PsiReferenceBase;
|
||
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.psi.xml.XmlElement;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.CustomReferenceConverter;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.DomUtil;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import com.intellij.util.xml.PsiClassConverter;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.Optional;
|
||
import java.util.Set;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NonNls;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public abstract class e
|
||
extends com.ccnode.codegenerator.dom.a.c<XmlAttributeValue>
|
||
implements CustomReferenceConverter<XmlAttributeValue> {
|
||
private final boolean a;
|
||
|
||
public e() {
|
||
this(true);
|
||
}
|
||
|
||
protected e(boolean bl) {
|
||
this.a = bl;
|
||
}
|
||
|
||
@Nullable
|
||
public XmlAttributeValue a(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
if (string == null) {
|
||
return null;
|
||
}
|
||
if (convertContext.getXmlElement() == null) {
|
||
return null;
|
||
}
|
||
boolean bl = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getUseNewIndex();
|
||
if (bl) {
|
||
String string2 = "";
|
||
String string3 = "";
|
||
if (string.contains(".")) {
|
||
string2 = string.substring(0, string.lastIndexOf("."));
|
||
string3 = string.substring(string.lastIndexOf(".") + 1);
|
||
} else {
|
||
string2 = v.com_ccnode_codegenerator_dom_model_Mapper_a(convertContext.getInvocationElement()).getNamespace().getStringValue();
|
||
string3 = string;
|
||
}
|
||
if (StringUtils.isBlank((CharSequence)string2)) {
|
||
return null;
|
||
}
|
||
if (StringUtils.isBlank((CharSequence)string3)) {
|
||
return null;
|
||
}
|
||
Collection<Mapper> collection = v.a((PsiElement)convertContext.getXmlElement(), convertContext.getProject(), string2);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (Mapper object : collection) {
|
||
arrayList.addAll(this.a(object, convertContext));
|
||
}
|
||
for (IdDomElement idDomElement : arrayList) {
|
||
String string4 = idDomElement.getId().getStringValue();
|
||
if (string4 == null || !string4.equals(string3)) continue;
|
||
return idDomElement.getId().getXmlAttributeValue();
|
||
}
|
||
return null;
|
||
}
|
||
XmlAttributeValue xmlAttributeValue = e.a(this.a(convertContext).a(), string, convertContext).orElse(null);
|
||
return xmlAttributeValue;
|
||
}
|
||
|
||
@NotNull
|
||
private static Optional<XmlAttributeValue> a(Collection<? extends IdDomElement> collection, String string, ConvertContext convertContext) {
|
||
Mapper mapper = v.com_ccnode_codegenerator_dom_model_Mapper_a(convertContext.getInvocationElement());
|
||
for (IdDomElement idDomElement : collection) {
|
||
GenericAttributeValue<String> genericAttributeValue;
|
||
if (!v.b(idDomElement).equals(string) && !v.a(idDomElement, mapper).equals(string) || (genericAttributeValue = idDomElement.getId()) == null) continue;
|
||
return Optional.ofNullable(genericAttributeValue.getXmlAttributeValue());
|
||
}
|
||
return Optional.empty();
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@Nullable XmlAttributeValue xmlAttributeValue, ConvertContext convertContext) {
|
||
if (xmlAttributeValue != null) {
|
||
DomElement domElement = DomUtil.getDomElement((PsiElement)xmlAttributeValue.getParent().getParent());
|
||
if (!(domElement instanceof IdDomElement)) {
|
||
return null;
|
||
}
|
||
Mapper mapper = v.com_ccnode_codegenerator_dom_model_Mapper_a(convertContext.getInvocationElement());
|
||
return v.a((IdDomElement)domElement, mapper);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private b a(ConvertContext convertContext) {
|
||
return new a(convertContext);
|
||
}
|
||
|
||
@NotNull
|
||
public abstract Collection<? extends IdDomElement> a(@NotNull Mapper var1, ConvertContext var2);
|
||
|
||
@NotNull
|
||
public PsiReference[] createReferences(GenericDomValue<XmlAttributeValue> genericDomValue, PsiElement psiElement, ConvertContext convertContext) {
|
||
return PsiClassConverter.createJavaClassReferenceProvider(genericDomValue, null, (JavaClassReferenceProvider)new d(this, convertContext)).getReferencesByElement(psiElement);
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
return this.a(string, convertContext);
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ String toString(@Nullable Object object, ConvertContext convertContext) {
|
||
return this.a((XmlAttributeValue)object, convertContext);
|
||
}
|
||
|
||
private abstract class b {
|
||
protected ConvertContext a;
|
||
|
||
public b(ConvertContext convertContext) {
|
||
this.a = convertContext;
|
||
}
|
||
|
||
public abstract Collection<? extends IdDomElement> a();
|
||
}
|
||
|
||
private class a
|
||
extends b {
|
||
public a(ConvertContext convertContext) {
|
||
super(convertContext);
|
||
}
|
||
|
||
@Override
|
||
public Collection<? extends IdDomElement> a() {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
XmlElement xmlElement = e.this.getXmlElement();
|
||
if (xmlElement != null) {
|
||
Collection<Mapper> collection = v.a((PsiElement)xmlElement);
|
||
for (Mapper mapper : collection) {
|
||
arrayList.addAll(e.this.a(mapper, (ConvertContext)e.this));
|
||
}
|
||
return arrayList;
|
||
}
|
||
Collection<Mapper> collection = v.b(e.this.getProject());
|
||
for (Mapper mapper : collection) {
|
||
arrayList.addAll(e.this.a(mapper, (ConvertContext)e.this));
|
||
}
|
||
return arrayList;
|
||
}
|
||
}
|
||
|
||
private class d
|
||
extends JavaClassReferenceProvider {
|
||
private ConvertContext var_com_intellij_util_xml_ConvertContext_a;
|
||
final /* synthetic */ e var_com_ccnode_codegenerator_dom_a_e_a;
|
||
|
||
private d(e e2, ConvertContext convertContext) {
|
||
this.var_com_ccnode_codegenerator_dom_a_e_a = e2;
|
||
this.var_com_intellij_util_xml_ConvertContext_a = convertContext;
|
||
}
|
||
|
||
@Nullable
|
||
public GlobalSearchScope getScope(Project project) {
|
||
return GlobalSearchScope.allScope((Project)project);
|
||
}
|
||
|
||
@NotNull
|
||
public PsiReference[] getReferencesByString(String string, @NotNull PsiElement psiElement, int n2) {
|
||
ArrayList arrayList = Lists.newArrayList((Object[])super.getReferencesByString(string, psiElement, n2));
|
||
c c2 = new c(this.var_com_ccnode_codegenerator_dom_a_e_a, psiElement, this.a(psiElement), this.var_com_intellij_util_xml_ConvertContext_a, string);
|
||
if (!arrayList.isEmpty()) {
|
||
arrayList.remove(arrayList.size() - 1);
|
||
arrayList.add(c2);
|
||
}
|
||
return arrayList.toArray(new PsiReference[arrayList.size()]);
|
||
}
|
||
|
||
private TextRange a(PsiElement psiElement) {
|
||
String string = psiElement.getText();
|
||
int n2 = string.lastIndexOf(f_0.var_java_lang_String_a);
|
||
return -1 == n2 ? ElementManipulators.getValueTextRange((PsiElement)psiElement) : TextRange.create((int)(string.substring(0, n2).length() + 1), (int)(string.length() - 1));
|
||
}
|
||
}
|
||
|
||
private class c
|
||
extends PsiReferenceBase<PsiElement> {
|
||
private ConvertContext var_com_intellij_util_xml_ConvertContext_a;
|
||
private String var_java_lang_String_a;
|
||
final /* synthetic */ e var_com_ccnode_codegenerator_dom_a_e_a;
|
||
|
||
public c(@NotNull e e2, PsiElement psiElement, TextRange textRange, ConvertContext convertContext, String string) {
|
||
this.var_com_ccnode_codegenerator_dom_a_e_a = e2;
|
||
super(psiElement, textRange, false);
|
||
this.var_com_intellij_util_xml_ConvertContext_a = convertContext;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
@Nullable
|
||
public PsiElement resolve() {
|
||
return this.var_com_ccnode_codegenerator_dom_a_e_a.a(this.var_java_lang_String_a, this.var_com_intellij_util_xml_ConvertContext_a);
|
||
}
|
||
|
||
@NotNull
|
||
public Object[] getVariants() {
|
||
Set<String> set = this.getElement().getText().contains(f_0.var_java_lang_String_a) ? this.a() : this.b();
|
||
return set.toArray(new String[set.size()]);
|
||
}
|
||
|
||
private Set<String> a() {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
String string = this.var_java_lang_String_a.substring(0, this.var_java_lang_String_a.lastIndexOf(f_0.var_java_lang_String_a));
|
||
for (IdDomElement idDomElement : this.var_com_ccnode_codegenerator_dom_a_e_a.a(this.var_com_intellij_util_xml_ConvertContext_a).a()) {
|
||
if (!v.java_lang_String_a(idDomElement).equals(string)) continue;
|
||
hashSet.add(v.a(idDomElement));
|
||
}
|
||
return hashSet;
|
||
}
|
||
|
||
private Set<String> b() {
|
||
Mapper mapper = v.com_ccnode_codegenerator_dom_model_Mapper_a(this.var_com_intellij_util_xml_ConvertContext_a.getInvocationElement());
|
||
Collection<? extends IdDomElement> collection = this.var_com_ccnode_codegenerator_dom_a_e_a.a(this.var_com_intellij_util_xml_ConvertContext_a).a();
|
||
HashSet<String> hashSet = new HashSet<String>(collection.size());
|
||
for (IdDomElement idDomElement : collection) {
|
||
hashSet.add(v.a(idDomElement, mapper));
|
||
}
|
||
return hashSet;
|
||
}
|
||
|
||
public boolean isSoft() {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.CustomReferenceConverter
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.O.e.a;
|
||
import com.ccnode.codegenerator.dom.a.c;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.CustomReferenceConverter;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import java.util.Arrays;
|
||
import java.util.List;
|
||
import java.util.stream.Collectors;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class f
|
||
extends c<PsiField>
|
||
implements CustomReferenceConverter<PsiField> {
|
||
@NotNull
|
||
public PsiReference[] createReferences(GenericDomValue<PsiField> genericDomValue, PsiElement psiElement, ConvertContext convertContext) {
|
||
if (psiElement.getTextLength() >= 2) {
|
||
return new PsiReference[]{new a(psiElement, new TextRange(1, psiElement.getTextLength() - 1), true)};
|
||
}
|
||
return new PsiReference[0];
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@Nullable PsiField psiField, ConvertContext convertContext) {
|
||
if (psiField != null) {
|
||
return psiField.getName();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@Nullable
|
||
public PsiField a(@Nullable String string, ConvertContext convertContext) {
|
||
List list;
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)convertContext.getProject()).findClass("org.apache.ibatis.type.JdbcType", GlobalSearchScope.allScope((Project)convertContext.getProject()));
|
||
if (psiClass != null && !(list = Arrays.stream(psiClass.getFields()).filter(psiField -> psiField.getName().equals(string)).collect(Collectors.toList())).isEmpty()) {
|
||
return (PsiField)list.get(0);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@Nullable String string, ConvertContext convertContext) {
|
||
return this.a(string, convertContext);
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ String toString(@Nullable Object object, ConvertContext convertContext) {
|
||
return this.a((PsiField)object, convertContext);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.ConvertContext
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.dom.a.e;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class g
|
||
extends e {
|
||
@Override
|
||
@NotNull
|
||
public Collection<? extends IdDomElement> a(@NotNull Mapper mapper, ConvertContext convertContext) {
|
||
return mapper.getSelects();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.ElementManipulators
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.CustomReferenceConverter
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* org.jetbrains.annotations.NonNls
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.dom.a.c;
|
||
import com.ccnode.codegenerator.dom.a.k;
|
||
import com.intellij.psi.ElementManipulators;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.CustomReferenceConverter;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import org.jetbrains.annotations.NonNls;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class h
|
||
extends c<XmlAttributeValue>
|
||
implements CustomReferenceConverter<XmlAttributeValue> {
|
||
@NotNull
|
||
public PsiReference[] createReferences(GenericDomValue<XmlAttributeValue> genericDomValue, PsiElement psiElement, ConvertContext convertContext) {
|
||
String string = genericDomValue.getStringValue();
|
||
if (string == null) {
|
||
return PsiReference.EMPTY_ARRAY;
|
||
}
|
||
return new PsiReference[]{new k(psiElement, ElementManipulators.getValueTextRange((PsiElement)psiElement))};
|
||
}
|
||
|
||
@Nullable
|
||
public XmlAttributeValue a(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
DomElement domElement = convertContext.getInvocationElement();
|
||
return domElement instanceof GenericAttributeValue ? ((GenericAttributeValue)domElement).getXmlAttributeValue() : null;
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
return this.a(string, convertContext);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.codeInsight.completion.InsertHandler
|
||
* com.intellij.codeInsight.completion.InsertionContext
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.intellij.codeInsight.completion.InsertHandler;
|
||
import com.intellij.codeInsight.completion.InsertionContext;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
class i
|
||
implements InsertHandler {
|
||
public static final InsertHandler<LookupElement> a = new i();
|
||
|
||
i() {
|
||
}
|
||
|
||
public void handleInsert(@NotNull InsertionContext insertionContext, @NotNull LookupElement lookupElement) {
|
||
Editor editor = insertionContext.getEditor();
|
||
Document document = editor.getDocument();
|
||
insertionContext.commitDocument();
|
||
int n2 = insertionContext.getTailOffset();
|
||
if (document.getText().charAt(insertionContext.getTailOffset()) == '\"' && document.getText().charAt(insertionContext.getTailOffset() - 1) == '\"') {
|
||
document.replaceString(insertionContext.getTailOffset() - 1, insertionContext.getTailOffset() + 1, (CharSequence)"\"");
|
||
editor.getCaretModel().moveToOffset(n2);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.ConvertContext
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.dom.a.e;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class j
|
||
extends e {
|
||
@Override
|
||
@NotNull
|
||
public Collection<? extends IdDomElement> a(@NotNull Mapper mapper, ConvertContext convertContext) {
|
||
return mapper.getParameterMaps();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Optional
|
||
* com.intellij.codeInspection.LocalQuickFix
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.ElementManipulators
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiClassType
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiElementFactory$SERVICE
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.PsiType
|
||
* com.intellij.psi.util.PropertyMemberType
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.CustomReferenceConverter
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NonNls
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.S.m;
|
||
import com.ccnode.codegenerator.ag.h.h;
|
||
import com.ccnode.codegenerator.dom.a.c;
|
||
import com.ccnode.codegenerator.dom.b;
|
||
import com.google.common.base.Optional;
|
||
import com.intellij.codeInspection.LocalQuickFix;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.ElementManipulators;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiClassType;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiElementFactory;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.PsiType;
|
||
import com.intellij.psi.util.PropertyMemberType;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.CustomReferenceConverter;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NonNls;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class l
|
||
extends c<XmlAttributeValue>
|
||
implements CustomReferenceConverter<XmlAttributeValue> {
|
||
@NotNull
|
||
public PsiReference[] createReferences(GenericDomValue<XmlAttributeValue> genericDomValue, PsiElement psiElement, ConvertContext convertContext) {
|
||
String string = genericDomValue.getStringValue();
|
||
if (string == null) {
|
||
return PsiReference.EMPTY_ARRAY;
|
||
}
|
||
return new m(string, psiElement, ElementManipulators.getOffsetInElement((PsiElement)psiElement)).getPsiReferences();
|
||
}
|
||
|
||
@Nullable
|
||
public XmlAttributeValue a(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
DomElement domElement = convertContext.getInvocationElement();
|
||
return domElement instanceof GenericAttributeValue ? ((GenericAttributeValue)domElement).getXmlAttributeValue() : null;
|
||
}
|
||
|
||
public LocalQuickFix[] getQuickFixes(ConvertContext convertContext) {
|
||
Optional<PsiClass> optional;
|
||
GenericAttributeValue genericAttributeValue = (GenericAttributeValue)convertContext.getInvocationElement();
|
||
XmlAttributeValue xmlAttributeValue = genericAttributeValue.getXmlAttributeValue();
|
||
if (xmlAttributeValue != null && StringUtils.isNotBlank((CharSequence)xmlAttributeValue.getValue()) && (optional = b.a.a(xmlAttributeValue)).isPresent()) {
|
||
PsiClass psiClass = (PsiClass)optional.get();
|
||
PsiClassType psiClassType = PsiElementFactory.SERVICE.getInstance((Project)psiClass.getProject()).createTypeByFQClassName("java.lang.String");
|
||
h h2 = new h(psiClass, (PsiType)psiClassType, PropertyMemberType.FIELD);
|
||
return new LocalQuickFix[]{h2};
|
||
}
|
||
return LocalQuickFix.EMPTY_ARRAY;
|
||
}
|
||
|
||
@Override
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@Nullable @NonNls String string, ConvertContext convertContext) {
|
||
return this.a(string, convertContext);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Predicate
|
||
* com.google.common.collect.Collections2
|
||
* com.intellij.codeInspection.LocalQuickFix
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.DomElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.dom.a;
|
||
import com.ccnode.codegenerator.dom.a.e;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.ccnode.codegenerator.dom.model.ResultMap;
|
||
import com.google.common.base.Predicate;
|
||
import com.google.common.collect.Collections2;
|
||
import com.intellij.codeInspection.LocalQuickFix;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.DomElement;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class m
|
||
extends e {
|
||
@Override
|
||
@NotNull
|
||
public Collection<? extends IdDomElement> a(@NotNull Mapper mapper, ConvertContext convertContext) {
|
||
DomElement domElement = convertContext.getInvocationElement();
|
||
if (this.a(mapper, domElement)) {
|
||
return this.a(mapper, (ResultMap)domElement.getParent());
|
||
}
|
||
return mapper.getResultMaps();
|
||
}
|
||
|
||
private boolean a(Mapper mapper, DomElement domElement) {
|
||
return v.a(v.com_ccnode_codegenerator_dom_model_Mapper_a(domElement), mapper) && domElement.getParent() instanceof ResultMap;
|
||
}
|
||
|
||
private Collection<? extends IdDomElement> a(Mapper mapper, ResultMap resultMap) {
|
||
return Collections2.filter(mapper.getResultMaps(), (Predicate)new Predicate<ResultMap>(){
|
||
final /* synthetic */ ResultMap var_com_ccnode_codegenerator_dom_model_ResultMap_a;
|
||
final /* synthetic */ m var_com_ccnode_codegenerator_dom_a_m_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_dom_a_m_a = m2;
|
||
this.var_com_ccnode_codegenerator_dom_model_ResultMap_a = resultMap;
|
||
}
|
||
|
||
public boolean a(ResultMap resultMap) {
|
||
String string = v.a(resultMap);
|
||
if (string == null) {
|
||
return false;
|
||
}
|
||
return !string.equals(v.a(this.var_com_ccnode_codegenerator_dom_model_ResultMap_a));
|
||
}
|
||
|
||
public /* synthetic */ boolean apply(Object object) {
|
||
return this.a((ResultMap)object);
|
||
}
|
||
});
|
||
}
|
||
|
||
public LocalQuickFix[] getQuickFixes(ConvertContext convertContext) {
|
||
XmlAttribute xmlAttribute = (XmlAttribute)convertContext.getInvocationElement().getXmlElement();
|
||
if (xmlAttribute == null) {
|
||
return LocalQuickFix.EMPTY_ARRAY;
|
||
}
|
||
XmlTag xmlTag = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a((PsiElement)xmlAttribute, false);
|
||
if (xmlTag == null) {
|
||
return LocalQuickFix.EMPTY_ARRAY;
|
||
}
|
||
String string = xmlAttribute.getValue();
|
||
if (string == null) {
|
||
return LocalQuickFix.EMPTY_ARRAY;
|
||
}
|
||
return new LocalQuickFix[]{new a(xmlTag, string)};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.ConvertContext
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.dom.a.e;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class n
|
||
extends e {
|
||
@Override
|
||
@NotNull
|
||
public Collection<? extends IdDomElement> a(@NotNull Mapper mapper, ConvertContext convertContext) {
|
||
return mapper.getSqls();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElementBuilder
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.module.ModuleUtilCore
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.roots.ModuleRootManager
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.util.IncorrectOperationException
|
||
* com.intellij.util.xml.ConvertContext
|
||
* com.intellij.util.xml.Converter
|
||
* com.intellij.util.xml.CustomReferenceConverter
|
||
* com.intellij.util.xml.GenericDomValue
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.a;
|
||
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.dom.a.i;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.module.ModuleUtilCore;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.roots.ModuleRootManager;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.util.IncorrectOperationException;
|
||
import com.intellij.util.xml.ConvertContext;
|
||
import com.intellij.util.xml.Converter;
|
||
import com.intellij.util.xml.CustomReferenceConverter;
|
||
import com.intellij.util.xml.GenericDomValue;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.function.BiConsumer;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class o
|
||
extends Converter<XmlFile>
|
||
implements CustomReferenceConverter<XmlFile> {
|
||
@NotNull
|
||
public PsiReference[] createReferences(GenericDomValue<XmlFile> genericDomValue, PsiElement psiElement, ConvertContext convertContext) {
|
||
return new PsiReference[]{new a(this, psiElement, genericDomValue.getRawText(), convertContext)};
|
||
}
|
||
|
||
@Nullable
|
||
public XmlFile a(@Nullable String string, ConvertContext convertContext) {
|
||
if (string == null) {
|
||
return null;
|
||
}
|
||
Map<String, XmlFile> map = v.a(convertContext.getProject());
|
||
return map.get(string);
|
||
}
|
||
|
||
@Nullable
|
||
public String a(@Nullable XmlFile xmlFile, ConvertContext convertContext) {
|
||
String[] stringArray;
|
||
if (xmlFile == null) {
|
||
return null;
|
||
}
|
||
VirtualFile virtualFile = xmlFile.getVirtualFile();
|
||
Module module = ModuleUtilCore.findModuleForFile((VirtualFile)virtualFile, (Project)convertContext.getProject());
|
||
String string = virtualFile.toString();
|
||
for (String string2 : stringArray = ModuleRootManager.getInstance((Module)module).getSourceRootUrls(false)) {
|
||
if (string.indexOf(string2) == -1) continue;
|
||
return string.substring(string2.length() + 1);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ String toString(@Nullable Object object, ConvertContext convertContext) {
|
||
return this.a((XmlFile)object, convertContext);
|
||
}
|
||
|
||
@Nullable
|
||
public /* synthetic */ Object fromString(@Nullable String string, ConvertContext convertContext) {
|
||
return this.a(string, convertContext);
|
||
}
|
||
|
||
private class a
|
||
implements PsiReference {
|
||
private final PsiElement var_com_intellij_psi_PsiElement_a;
|
||
private final String var_java_lang_String_a;
|
||
private final ConvertContext var_com_intellij_util_xml_ConvertContext_a;
|
||
final /* synthetic */ o var_com_ccnode_codegenerator_dom_a_o_a;
|
||
|
||
public a(o o2, PsiElement psiElement, String string, ConvertContext convertContext) {
|
||
this.var_com_ccnode_codegenerator_dom_a_o_a = o2;
|
||
this.var_com_intellij_psi_PsiElement_a = psiElement;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_intellij_util_xml_ConvertContext_a = convertContext;
|
||
}
|
||
|
||
@NotNull
|
||
public PsiElement getElement() {
|
||
return this.var_com_intellij_psi_PsiElement_a;
|
||
}
|
||
|
||
@NotNull
|
||
public TextRange getRangeInElement() {
|
||
return new TextRange(0, this.var_com_intellij_psi_PsiElement_a.getTextLength());
|
||
}
|
||
|
||
@Nullable
|
||
public PsiElement resolve() {
|
||
return this.var_com_ccnode_codegenerator_dom_a_o_a.a(this.var_java_lang_String_a, this.var_com_intellij_util_xml_ConvertContext_a);
|
||
}
|
||
|
||
@NotNull
|
||
public String getCanonicalText() {
|
||
if (this.var_java_lang_String_a == null) {
|
||
return "";
|
||
}
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public PsiElement handleElementRename(@NotNull String string) throws IncorrectOperationException {
|
||
XmlAttribute xmlAttribute;
|
||
XmlAttributeValue xmlAttributeValue;
|
||
XmlAttributeValue xmlAttributeValue2 = xmlAttributeValue = this.var_com_intellij_psi_PsiElement_a instanceof XmlAttributeValue ? (XmlAttributeValue)this.var_com_intellij_psi_PsiElement_a : null;
|
||
if (xmlAttributeValue == null) {
|
||
return this.var_com_intellij_psi_PsiElement_a;
|
||
}
|
||
XmlAttribute xmlAttribute2 = xmlAttribute = xmlAttributeValue.getParent() instanceof XmlAttribute ? (XmlAttribute)xmlAttributeValue.getParent() : null;
|
||
if (xmlAttribute == null) {
|
||
return this.var_com_intellij_psi_PsiElement_a;
|
||
}
|
||
String string2 = this.var_com_intellij_psi_PsiElement_a.getText();
|
||
int n2 = string2.lastIndexOf("/");
|
||
if (n2 >= 0) {
|
||
xmlAttribute.setValue(this.var_com_intellij_psi_PsiElement_a.getText().substring(1, n2 + 1) + string);
|
||
} else {
|
||
xmlAttribute.setValue(string);
|
||
}
|
||
return xmlAttribute.getValueElement();
|
||
}
|
||
|
||
public PsiElement bindToElement(@NotNull PsiElement psiElement) throws IncorrectOperationException {
|
||
return null;
|
||
}
|
||
|
||
public boolean isReferenceTo(@NotNull PsiElement psiElement) {
|
||
return psiElement.equals(this.resolve());
|
||
}
|
||
|
||
public boolean isSoft() {
|
||
return false;
|
||
}
|
||
|
||
@NotNull
|
||
public Object[] getVariants() {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
Map<String, XmlFile> map = v.a(this.var_com_intellij_util_xml_ConvertContext_a.getProject());
|
||
map.forEach(new BiConsumer<String, XmlFile>(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_dom_a_o$a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_dom_a_o$a_a = a2;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
public void a(String string, XmlFile xmlFile) {
|
||
this.var_java_util_List_a.add(LookupElementBuilder.create((String)("\"" + string + "\"")).withInsertHandler(i.a));
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (XmlFile)object2);
|
||
}
|
||
});
|
||
return arrayList.toArray(new LookupElement[arrayList.size()]);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.util.xml.DomFileDescription
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.description;
|
||
|
||
import com.ccnode.codegenerator.ad.l;
|
||
import com.ccnode.codegenerator.dom.model.Configuration;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.util.xml.DomFileDescription;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class ConfigurationDescription
|
||
extends DomFileDescription<Configuration> {
|
||
public ConfigurationDescription() {
|
||
super(Configuration.class, "configuration", new String[0]);
|
||
}
|
||
|
||
public boolean isMyFile(@NotNull XmlFile xmlFile, @Nullable Module module) {
|
||
return l.a((PsiFile)xmlFile);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.util.xml.DomFileDescription
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.dom.description;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.util.xml.DomFileDescription;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class MapperDescription
|
||
extends DomFileDescription<Mapper> {
|
||
public MapperDescription() {
|
||
super(Mapper.class, "mapper", new String[0]);
|
||
}
|
||
|
||
public boolean isMyFile(@NotNull XmlFile xmlFile, @Nullable Module module) {
|
||
return d_0.var_com_ccnode_codegenerator_ad_d_0_a.a((PsiFile)xmlFile);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.ConstructorGroup;
|
||
|
||
public interface Arg
|
||
extends ConstructorGroup {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.GroupFour;
|
||
import com.ccnode.codegenerator.dom.model.PropertyGroup;
|
||
import com.ccnode.codegenerator.dom.model.ResultMapGroup;
|
||
import com.ccnode.codegenerator.dom.model.SelectAttributeGroup;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Association
|
||
extends GroupFour,
|
||
PropertyGroup,
|
||
ResultMapGroup,
|
||
SelectAttributeGroup {
|
||
@Override
|
||
@Attribute(value="javaType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getJavaType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.BeanProperty;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Bean
|
||
extends DomElement {
|
||
@SubTagList(value="property")
|
||
@NotNull
|
||
public List<BeanProperty> getBeanProperties();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface BeanProperty
|
||
extends DomElement {
|
||
@Attribute(value="name")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getName();
|
||
|
||
@Attribute(value="value")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getValue();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Bean;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Beans
|
||
extends DomElement {
|
||
@SubTagList(value="bean")
|
||
@NotNull
|
||
public List<Bean> getBeans();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.DomElement;
|
||
|
||
public interface Bind
|
||
extends DomElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Property;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
|
||
public interface Cache
|
||
extends DomElement {
|
||
@SubTagList(value="property")
|
||
public List<Property> getProperties();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.DomElement;
|
||
|
||
public interface CacheRef
|
||
extends DomElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.GroupFour;
|
||
import com.ccnode.codegenerator.dom.model.ResultMapGroup;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Case
|
||
extends GroupFour,
|
||
ResultMapGroup {
|
||
@Attribute(value="resultType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getResultType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.Required
|
||
* com.intellij.util.xml.SubTag
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Otherwise;
|
||
import com.ccnode.codegenerator.dom.model.When;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.Required;
|
||
import com.intellij.util.xml.SubTag;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Choose
|
||
extends DomElement {
|
||
@Required
|
||
@SubTagList(value="when")
|
||
@NotNull
|
||
public List<When> getWhens();
|
||
|
||
@SubTag(value="otherwise")
|
||
public Otherwise getOtherwise();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.GroupFour;
|
||
import com.ccnode.codegenerator.dom.model.PropertyGroup;
|
||
import com.ccnode.codegenerator.dom.model.ResultMapGroup;
|
||
import com.ccnode.codegenerator.dom.model.SelectAttributeGroup;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Collection
|
||
extends GroupFour,
|
||
PropertyGroup,
|
||
ResultMapGroup,
|
||
SelectAttributeGroup {
|
||
@Attribute(value="ofType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getOfType();
|
||
|
||
@Override
|
||
@Attribute(value="javaType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getJavaType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTag
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.ConfigurationMappers;
|
||
import com.ccnode.codegenerator.dom.model.Plugins;
|
||
import com.ccnode.codegenerator.dom.model.Properties;
|
||
import com.ccnode.codegenerator.dom.model.Settings;
|
||
import com.ccnode.codegenerator.dom.model.TypeAliases;
|
||
import com.ccnode.codegenerator.dom.model.TypeHandlers;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTag;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Configuration
|
||
extends DomElement {
|
||
@SubTagList(value="typeAliases")
|
||
@NotNull
|
||
public List<TypeAliases> getTypeAliases();
|
||
|
||
@SubTagList(value="mappers")
|
||
@NotNull
|
||
public List<ConfigurationMappers> getMappers();
|
||
|
||
@SubTag(value="properties")
|
||
@NotNull
|
||
public Properties getProperties();
|
||
|
||
@SubTag(value="typeHandlers")
|
||
@NotNull
|
||
public TypeHandlers getTypeHandlers();
|
||
|
||
@SubTag(value="settings")
|
||
@NotNull
|
||
public Settings getSettings();
|
||
|
||
@SubTag(value="plugins")
|
||
@NotNull
|
||
public Plugins getPlugins();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.PsiClassConverter
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.o;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.PsiClassConverter;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface ConfigurationMapper
|
||
extends DomElement {
|
||
@Attribute(value="url")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getUrl();
|
||
|
||
@Attribute(value="class")
|
||
@Convert(value=PsiClassConverter.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getClazz();
|
||
|
||
@Attribute(value="resource")
|
||
@Convert(value=o.class)
|
||
@NotNull
|
||
public GenericAttributeValue<XmlFile> getResource();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.ConfigurationMapper;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface ConfigurationMappers
|
||
extends DomElement {
|
||
@SubTagList(value="mapper")
|
||
@NotNull
|
||
public List<ConfigurationMapper> getMapper();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Arg;
|
||
import com.ccnode.codegenerator.dom.model.IdArg;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
|
||
public interface Constructor
|
||
extends DomElement {
|
||
@SubTagList(value="arg")
|
||
public List<Arg> getArgs();
|
||
|
||
@SubTagList(value="idArg")
|
||
public List<IdArg> getIdArgs();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.a.f;
|
||
import com.ccnode.codegenerator.dom.a.g;
|
||
import com.ccnode.codegenerator.dom.a.h;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface ConstructorGroup
|
||
extends DomElement {
|
||
@Attribute(value="javaType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getJavaType();
|
||
|
||
@Attribute(value="name")
|
||
@Convert(value=h.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getName();
|
||
|
||
@Attribute(value="jdbcType")
|
||
@Convert(value=f.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiField> getJdbcType();
|
||
|
||
@Attribute(value="typeHandler")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getTypeHandler();
|
||
|
||
@Attribute(value="select")
|
||
@Convert(value=g.class)
|
||
@NotNull
|
||
public GenericAttributeValue<XmlTag> getSelect();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupTwo;
|
||
|
||
public interface Delete
|
||
extends GroupTwo {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.Required
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.Case;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.Required;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Discriminator
|
||
extends DomElement {
|
||
@Required
|
||
@SubTagList(value="case")
|
||
public List<Case> getCases();
|
||
|
||
@Attribute(value="javaType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getJavaType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface Foreach
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTag
|
||
* com.intellij.util.xml.SubTagList
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Association;
|
||
import com.ccnode.codegenerator.dom.model.Collection;
|
||
import com.ccnode.codegenerator.dom.model.Constructor;
|
||
import com.ccnode.codegenerator.dom.model.Discriminator;
|
||
import com.ccnode.codegenerator.dom.model.Id;
|
||
import com.ccnode.codegenerator.dom.model.Result;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTag;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
|
||
public interface GroupFour
|
||
extends DomElement {
|
||
@SubTag(value="constructor")
|
||
public Constructor getConstructor();
|
||
|
||
@SubTagList(value="id")
|
||
public List<Id> getIds();
|
||
|
||
@SubTagList(value="result")
|
||
public List<Result> getResults();
|
||
|
||
@SubTagList(value="association")
|
||
public List<Association> getAssociations();
|
||
|
||
@SubTagList(value="collection")
|
||
public List<Collection> getCollections();
|
||
|
||
@SubTag(value="discriminator")
|
||
public Discriminator getDiscriminator();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Choose;
|
||
import com.ccnode.codegenerator.dom.model.Foreach;
|
||
import com.ccnode.codegenerator.dom.model.If;
|
||
import com.ccnode.codegenerator.dom.model.Include;
|
||
import com.ccnode.codegenerator.dom.model.Set;
|
||
import com.ccnode.codegenerator.dom.model.Trim;
|
||
import com.ccnode.codegenerator.dom.model.Where;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface GroupOne
|
||
extends DomElement {
|
||
@SubTagList(value="include")
|
||
@NotNull
|
||
public List<Include> getIncludes();
|
||
|
||
@SubTagList(value="trim")
|
||
@NotNull
|
||
public List<Trim> getTrims();
|
||
|
||
@SubTagList(value="where")
|
||
@NotNull
|
||
public List<Where> getWheres();
|
||
|
||
@SubTagList(value="set")
|
||
@NotNull
|
||
public List<Set> getSets();
|
||
|
||
@SubTagList(value="foreach")
|
||
@NotNull
|
||
public List<Foreach> getForeachs();
|
||
|
||
@SubTagList(value="choose")
|
||
@NotNull
|
||
public List<Choose> getChooses();
|
||
|
||
@SubTagList(value="if")
|
||
@NotNull
|
||
public List<If> getIfs();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.SubTagList
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupTwo;
|
||
import com.ccnode.codegenerator.dom.model.SelectKey;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
|
||
public interface GroupThree
|
||
extends GroupTwo {
|
||
@SubTagList(value="selectKey")
|
||
public List<SelectKey> getSelectKey();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.a.d;
|
||
import com.ccnode.codegenerator.dom.a.j;
|
||
import com.ccnode.codegenerator.dom.model.Bind;
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface GroupTwo
|
||
extends GroupOne,
|
||
IdDomElement {
|
||
@SubTagList(value="bind")
|
||
public List<Bind> getBinds();
|
||
|
||
@Attribute(value="parameterMap")
|
||
@Convert(value=j.class)
|
||
@NotNull
|
||
public GenericAttributeValue<XmlTag> getParameterMap();
|
||
|
||
@Override
|
||
@Attribute(value="id")
|
||
@Convert(value=d.class)
|
||
public GenericAttributeValue<String> getId();
|
||
|
||
@Attribute(value="parameterType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getParameterType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.PropertyGroup;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Id
|
||
extends PropertyGroup {
|
||
@Override
|
||
@Attribute(value="javaType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getJavaType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.ConstructorGroup;
|
||
|
||
public interface IdArg
|
||
extends ConstructorGroup {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.NameValue
|
||
* com.intellij.util.xml.Required
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.NameValue;
|
||
import com.intellij.util.xml.Required;
|
||
|
||
public interface IdDomElement
|
||
extends DomElement {
|
||
@Required
|
||
@NameValue(unique=false)
|
||
@Attribute(value="id")
|
||
public GenericAttributeValue<String> getId();
|
||
|
||
public void setValue(String var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface If
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.n;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
|
||
public interface Include
|
||
extends DomElement {
|
||
@Attribute(value="refid")
|
||
@Convert(value=n.class)
|
||
public GenericAttributeValue<XmlTag> getRefId();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupThree;
|
||
|
||
public interface Insert
|
||
extends GroupThree {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.NameValue
|
||
* com.intellij.util.xml.PsiClassConverter
|
||
* com.intellij.util.xml.Required
|
||
* com.intellij.util.xml.SubTagList
|
||
* com.intellij.util.xml.SubTagsList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Delete;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Insert;
|
||
import com.ccnode.codegenerator.dom.model.ParameterMap;
|
||
import com.ccnode.codegenerator.dom.model.ResultMap;
|
||
import com.ccnode.codegenerator.dom.model.Select;
|
||
import com.ccnode.codegenerator.dom.model.Sql;
|
||
import com.ccnode.codegenerator.dom.model.Update;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.NameValue;
|
||
import com.intellij.util.xml.PsiClassConverter;
|
||
import com.intellij.util.xml.Required;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import com.intellij.util.xml.SubTagsList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Mapper
|
||
extends DomElement {
|
||
@SubTagsList(value={"insert", "update", "delete", "select"})
|
||
@NotNull
|
||
public List<IdDomElement> getDaoElements();
|
||
|
||
@Required
|
||
@NameValue
|
||
@Attribute(value="namespace")
|
||
@Convert(value=PsiClassConverter.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getNamespace();
|
||
|
||
@SubTagList(value="resultMap")
|
||
@NotNull
|
||
public List<ResultMap> getResultMaps();
|
||
|
||
@SubTagList(value="parameterMap")
|
||
@NotNull
|
||
public List<ParameterMap> getParameterMaps();
|
||
|
||
@SubTagList(value="sql")
|
||
@NotNull
|
||
public List<Sql> getSqls();
|
||
|
||
@SubTagList(value="insert")
|
||
@NotNull
|
||
public List<Insert> getInserts();
|
||
|
||
@SubTagList(value="update")
|
||
@NotNull
|
||
public List<Update> getUpdates();
|
||
|
||
@SubTagList(value="delete")
|
||
@NotNull
|
||
public List<Delete> getDeletes();
|
||
|
||
@SubTagList(value="select")
|
||
@NotNull
|
||
public List<Select> getSelects();
|
||
|
||
@SubTagList(value="select")
|
||
public Select addSelect();
|
||
|
||
@SubTagList(value="update")
|
||
public Update addUpdate();
|
||
|
||
@SubTagList(value="insert")
|
||
public Insert addInsert();
|
||
|
||
@SubTagList(value="delete")
|
||
public Delete addDelete();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface Otherwise
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Package
|
||
extends DomElement {
|
||
@Attribute(value="name")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getName();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.PropertyGroup;
|
||
|
||
public interface Parameter
|
||
extends PropertyGroup {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.ccnode.codegenerator.dom.model.Parameter;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface ParameterMap
|
||
extends IdDomElement {
|
||
@Attribute(value="type")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getType();
|
||
|
||
@SubTagList(value="parameter")
|
||
public List<Parameter> getParameters();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.PsiClassConverter
|
||
* com.intellij.util.xml.Required
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Property;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.PsiClassConverter;
|
||
import com.intellij.util.xml.Required;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Plugin
|
||
extends DomElement {
|
||
@Required
|
||
@Convert(value=PsiClassConverter.class)
|
||
@Attribute(value="interceptor")
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getInterceptor();
|
||
|
||
@SubTagList(value="property")
|
||
@NotNull
|
||
public List<Property> getProperties();
|
||
|
||
public Property addProperty();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Plugin;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Plugins
|
||
extends DomElement {
|
||
@SubTagList(value="plugin")
|
||
@NotNull
|
||
public List<Plugin> getPlugins();
|
||
|
||
public Plugin addPlugin();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Property;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Properties
|
||
extends DomElement {
|
||
@Attribute(value="url")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getUrl();
|
||
|
||
@Attribute(value="resource")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getResource();
|
||
|
||
@SubTagList(value="property")
|
||
@NotNull
|
||
public List<Property> getProperties();
|
||
|
||
public Property addProperty();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.Required
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.Required;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Property
|
||
extends DomElement {
|
||
@Required
|
||
@Attribute(value="name")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getName();
|
||
|
||
@Required
|
||
@Attribute(value="value")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getValue();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.a.f;
|
||
import com.ccnode.codegenerator.dom.a.l;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface PropertyGroup
|
||
extends DomElement {
|
||
@Attribute(value="property")
|
||
@Convert(value=l.class)
|
||
public GenericAttributeValue<XmlAttributeValue> getProperty();
|
||
|
||
@Attribute(value="javaType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getJavaType();
|
||
|
||
@Attribute(value="jdbcType")
|
||
@Convert(value=f.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiField> getJdbcType();
|
||
|
||
@Attribute(value="typeHandler")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getTypeHandler();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.PropertyGroup;
|
||
|
||
public interface Result
|
||
extends PropertyGroup {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.a.m;
|
||
import com.ccnode.codegenerator.dom.model.GroupFour;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface ResultMap
|
||
extends GroupFour,
|
||
IdDomElement {
|
||
@Attribute(value="extends")
|
||
@Convert(value=m.class)
|
||
@NotNull
|
||
public GenericAttributeValue<XmlAttributeValue> getExtends();
|
||
|
||
@Attribute(value="type")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.m;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface ResultMapGroup
|
||
extends DomElement {
|
||
@Attribute(value="resultMap")
|
||
@Convert(value=m.class)
|
||
@NotNull
|
||
public GenericAttributeValue<XmlAttributeValue> getResultMap();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.GroupTwo;
|
||
import com.ccnode.codegenerator.dom.model.ResultMapGroup;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Select
|
||
extends GroupTwo,
|
||
ResultMapGroup {
|
||
@Attribute(value="resultType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getResultType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.g;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface SelectAttributeGroup
|
||
extends DomElement {
|
||
@Attribute(value="select")
|
||
@Convert(value=g.class)
|
||
@NotNull
|
||
public GenericAttributeValue<XmlTag> getSelect();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.Convert
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.a.b;
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.Convert;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface SelectKey
|
||
extends GroupOne {
|
||
@Attribute(value="resultType")
|
||
@Convert(value=b.class)
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getResultType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface Set
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.Required
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.Required;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Setting
|
||
extends DomElement {
|
||
@Required
|
||
@Attribute(value="name")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getName();
|
||
|
||
@Required
|
||
@Attribute(value="value")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getValue();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Setting;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface Settings
|
||
extends DomElement {
|
||
@SubTagList(value="setting")
|
||
@NotNull
|
||
public List<Setting> getSettings();
|
||
|
||
public Setting addSetting();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
import com.ccnode.codegenerator.dom.model.IdDomElement;
|
||
|
||
public interface Sql
|
||
extends GroupOne,
|
||
IdDomElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface Trim
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface TypeAlias
|
||
extends DomElement {
|
||
@Attribute(value="type")
|
||
@NotNull
|
||
public GenericAttributeValue<PsiClass> getType();
|
||
|
||
@Attribute(value="alias")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getAlias();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.Package;
|
||
import com.ccnode.codegenerator.dom.model.TypeAlias;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface TypeAliases
|
||
extends DomElement {
|
||
@SubTagList(value="typeAlias")
|
||
@NotNull
|
||
public List<TypeAlias> getTypeAlias();
|
||
|
||
@SubTagList(value="package")
|
||
@NotNull
|
||
public List<Package> getPackages();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.Attribute
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* com.intellij.util.xml.Required
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.intellij.util.xml.Attribute;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import com.intellij.util.xml.Required;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface TypeHandler
|
||
extends DomElement {
|
||
@Required
|
||
@Attribute(value="handler")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getHandler();
|
||
|
||
@Attribute(value="jdbcType")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getJdbcType();
|
||
|
||
@Attribute(value="javaType")
|
||
@NotNull
|
||
public GenericAttributeValue<String> getJavaType();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.SubTagList
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.TypeHandler;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.SubTagList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface TypeHandlers
|
||
extends DomElement {
|
||
@SubTagList(value="typeHandler")
|
||
@NotNull
|
||
public List<TypeHandler> getTypeHandlers();
|
||
|
||
public TypeHandler addTypeHandler();
|
||
|
||
@SubTagList(value="package")
|
||
@NotNull
|
||
public List<Package> getPackages();
|
||
|
||
public Package addPackage();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupTwo;
|
||
|
||
public interface Update
|
||
extends GroupTwo {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface When
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.dom.model;
|
||
|
||
import com.ccnode.codegenerator.dom.model.GroupOne;
|
||
|
||
public interface Where
|
||
extends GroupOne {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.q;
|
||
|
||
import com.ccnode.codegenerator.q.c;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public final class a
|
||
extends Enum<a> {
|
||
public static final /* enum */ a var_com_ccnode_codegenerator_q_a_a;
|
||
public static final /* enum */ a var_com_ccnode_codegenerator_q_a_b;
|
||
public static final /* enum */ a var_com_ccnode_codegenerator_q_a_c;
|
||
public static final /* enum */ a d;
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private String var_java_lang_String_c;
|
||
private Icon var_javax_swing_Icon_a;
|
||
private Icon var_javax_swing_Icon_b;
|
||
private static final /* synthetic */ a[] var_com_ccnode_codegenerator_q_a_arr_a;
|
||
|
||
public static a[] com_ccnode_codegenerator_q_a_arr_a() {
|
||
return (a[])var_com_ccnode_codegenerator_q_a_arr_a.clone();
|
||
}
|
||
|
||
public static a com_ccnode_codegenerator_q_a_a(String string) {
|
||
return Enum.valueOf(a.class, string);
|
||
}
|
||
|
||
private a(String string2, String string3, String string4) {
|
||
this.var_java_lang_String_a = string2;
|
||
this.var_java_lang_String_b = string3;
|
||
this.var_java_lang_String_c = string4;
|
||
}
|
||
|
||
private a(String string2, Icon icon, Icon icon2) {
|
||
this.var_java_lang_String_a = string2;
|
||
this.var_javax_swing_Icon_a = icon;
|
||
this.var_javax_swing_Icon_b = icon2;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void void_a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void void_b(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
@NotNull
|
||
public Icon javax_swing_Icon_a() {
|
||
String string = this.java_lang_String_b();
|
||
return com.ccnode.codegenerator.q.c.a(string);
|
||
}
|
||
|
||
@NotNull
|
||
public Icon javax_swing_Icon_b() {
|
||
String string = this.c();
|
||
return com.ccnode.codegenerator.q.c.a(string);
|
||
}
|
||
|
||
public String c() {
|
||
return this.var_java_lang_String_c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.var_java_lang_String_c = string;
|
||
}
|
||
|
||
public static a com_ccnode_codegenerator_q_a_b(String string) {
|
||
a[] aArray;
|
||
for (a a2 : aArray = com.ccnode.codegenerator.q.a.com_ccnode_codegenerator_q_a_arr_a()) {
|
||
if (!string.equals(a2.java_lang_String_a())) continue;
|
||
return a2;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private static /* synthetic */ a[] com_ccnode_codegenerator_q_a_arr_b() {
|
||
return new a[]{var_com_ccnode_codegenerator_q_a_a, var_com_ccnode_codegenerator_q_a_b, var_com_ccnode_codegenerator_q_a_c, d};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_q_a_a = new a("default", "/icon/mybatis_java.svg", "/icon/mybatis_xml.svg");
|
||
var_com_ccnode_codegenerator_q_a_b = new a("arrow", "/icon/back-arrow-blue.png", "/icon/back-arrow-red.png");
|
||
var_com_ccnode_codegenerator_q_a_c = new a("arrow2", "/icon/right-arrow.png", "/icon/left-arrow.png");
|
||
d = new a("gray", "/icon/sendToTheRightGrayed.png", "/icon/sendToTheLeftGrayed.png");
|
||
var_com_ccnode_codegenerator_q_a_arr_a = com.ccnode.codegenerator.q.a.com_ccnode_codegenerator_q_a_arr_b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.q;
|
||
|
||
public final class b
|
||
extends Enum<b> {
|
||
public static final /* enum */ b var_com_ccnode_codegenerator_q_b_a;
|
||
public static final /* enum */ b b;
|
||
public static final /* enum */ b c;
|
||
public static final /* enum */ b d;
|
||
public static final /* enum */ b e;
|
||
public static final /* enum */ b f;
|
||
public static final /* enum */ b g;
|
||
public static final /* enum */ b h;
|
||
private static final /* synthetic */ b[] var_com_ccnode_codegenerator_q_b_arr_a;
|
||
|
||
public static b[] a() {
|
||
return (b[])var_com_ccnode_codegenerator_q_b_arr_a.clone();
|
||
}
|
||
|
||
public static b a(String string) {
|
||
return Enum.valueOf(b.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ b[] b() {
|
||
return new b[]{var_com_ccnode_codegenerator_q_b_a, b, c, d, e, f, g, h};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_q_b_a = new b();
|
||
b = new b();
|
||
c = new b();
|
||
d = new b();
|
||
e = new b();
|
||
f = new b();
|
||
g = new b();
|
||
h = new b();
|
||
var_com_ccnode_codegenerator_q_b_arr_a = com.ccnode.codegenerator.q.b.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.q;
|
||
|
||
public final class d
|
||
extends Enum<d> {
|
||
private static final /* synthetic */ d[] a;
|
||
|
||
public static d[] a() {
|
||
return (d[])a.clone();
|
||
}
|
||
|
||
public static d a(String string) {
|
||
return Enum.valueOf(d.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ d[] b() {
|
||
return new d[0];
|
||
}
|
||
|
||
static {
|
||
a = d.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.util.IconLoader
|
||
*/
|
||
package com.ccnode.codegenerator.q;
|
||
|
||
import com.intellij.openapi.util.IconLoader;
|
||
import javax.swing.Icon;
|
||
|
||
public class c {
|
||
public static Icon a(String string) {
|
||
return IconLoader.findIcon((String)string, (ClassLoader)c.class.getClassLoader());
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.q;
|
||
|
||
public final class e
|
||
extends Enum<e> {
|
||
public static final /* enum */ e var_com_ccnode_codegenerator_q_e_a;
|
||
public static final /* enum */ e b;
|
||
public static final /* enum */ e c;
|
||
private Integer var_java_lang_Integer_a;
|
||
private String var_java_lang_String_a;
|
||
private static final /* synthetic */ e[] var_com_ccnode_codegenerator_q_e_arr_a;
|
||
|
||
public static e[] com_ccnode_codegenerator_q_e_arr_a() {
|
||
return (e[])var_com_ccnode_codegenerator_q_e_arr_a.clone();
|
||
}
|
||
|
||
public static e com_ccnode_codegenerator_q_e_a(String string) {
|
||
return Enum.valueOf(e.class, string);
|
||
}
|
||
|
||
private e(Integer n3, String string2) {
|
||
this.var_java_lang_Integer_a = n3;
|
||
this.var_java_lang_String_a = string2;
|
||
}
|
||
|
||
public Integer java_lang_Integer_a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public static e b(String string) {
|
||
for (e e2 : e.com_ccnode_codegenerator_q_e_arr_a()) {
|
||
if (!e2.name().equals(string)) continue;
|
||
return e2;
|
||
}
|
||
return c;
|
||
}
|
||
|
||
public static e com_ccnode_codegenerator_q_e_a(Integer n2) {
|
||
for (e e2 : e.com_ccnode_codegenerator_q_e_arr_a()) {
|
||
if (!e2.java_lang_Integer_a().equals(n2)) continue;
|
||
return e2;
|
||
}
|
||
return c;
|
||
}
|
||
|
||
public static String java_lang_String_a(Integer n2) {
|
||
e e2 = e.com_ccnode_codegenerator_q_e_a(n2);
|
||
return e2.name();
|
||
}
|
||
|
||
public static Integer java_lang_Integer_a(String string) {
|
||
e e2 = e.b(string);
|
||
return e2.java_lang_Integer_a();
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a(String string) {
|
||
return this == e.b(string);
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a(Integer n2) {
|
||
return this == e.com_ccnode_codegenerator_q_e_a(n2);
|
||
}
|
||
|
||
private static /* synthetic */ e[] b() {
|
||
return new e[]{var_com_ccnode_codegenerator_q_e_a, b, c};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_q_e_a = new e(0, "ע<><D7A2>");
|
||
b = new e(1, "");
|
||
c = new e(-1, "none");
|
||
var_com_ccnode_codegenerator_q_e_arr_a = e.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.q;
|
||
|
||
public class f {
|
||
public static final String a = f.c();
|
||
public static final String b = "https://www.brucege.com/";
|
||
public static final String c = "https://brucege.com/pay/view";
|
||
private static String d = "https://github.com/gejun123456/MyBatisCodeHelper-Pro";
|
||
|
||
private static String c() {
|
||
return b;
|
||
}
|
||
|
||
public static String a() {
|
||
return "";
|
||
}
|
||
|
||
public static String b() {
|
||
return d;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.r;
|
||
|
||
public final class a
|
||
extends Enum<a> {
|
||
public static final /* enum */ a var_com_ccnode_codegenerator_r_a_a;
|
||
public static final /* enum */ a b;
|
||
private static final /* synthetic */ a[] var_com_ccnode_codegenerator_r_a_arr_a;
|
||
|
||
public static a[] a() {
|
||
return (a[])var_com_ccnode_codegenerator_r_a_arr_a.clone();
|
||
}
|
||
|
||
public static a a(String string) {
|
||
return Enum.valueOf(a.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ a[] b() {
|
||
return new a[]{var_com_ccnode_codegenerator_r_a_a, b};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_r_a_a = new a();
|
||
b = new a();
|
||
var_com_ccnode_codegenerator_r_a_arr_a = com.ccnode.codegenerator.r.a.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.r;
|
||
|
||
import com.ccnode.codegenerator.r.a;
|
||
|
||
public class b
|
||
extends RuntimeException {
|
||
private boolean var_boolean_a = false;
|
||
private String var_java_lang_String_a;
|
||
private a var_com_ccnode_codegenerator_r_a_a = com.ccnode.codegenerator.r.a.b;
|
||
|
||
public b(String string, boolean bl, a a2) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_boolean_a = bl;
|
||
this.var_com_ccnode_codegenerator_r_a_a = a2;
|
||
}
|
||
|
||
public b() {
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
@Override
|
||
public String getMessage() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public a com_ccnode_codegenerator_r_a_a() {
|
||
return this.var_com_ccnode_codegenerator_r_a_a;
|
||
}
|
||
|
||
public void a(a a2) {
|
||
this.var_com_ccnode_codegenerator_r_a_a = a2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.lang.xml.XmlFoldingBuilder
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.t;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.k.d;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.lang.xml.XmlFoldingBuilder;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import java.util.Set;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class a
|
||
extends XmlFoldingBuilder {
|
||
private static Set<String> a = Sets.newHashSet((Object[])new String[]{"selectByPrimaryKey", "insert", "insertSelective", "updateByPrimaryKeySelective", "updateByPrimaryKey", "deleteByPrimaryKey", "insertList", "batchInsert"});
|
||
|
||
public boolean isRegionCollapsedByDefault(@NotNull ASTNode aSTNode) {
|
||
XmlTag xmlTag;
|
||
boolean bl = super.isRegionCollapsedByDefault(aSTNode);
|
||
if (bl) {
|
||
return true;
|
||
}
|
||
if (!com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getFoldGeneratedMethod()) {
|
||
return false;
|
||
}
|
||
PsiElement psiElement = aSTNode.getPsi();
|
||
PsiFile psiFile = psiElement.getContainingFile();
|
||
if (psiFile == null) {
|
||
return false;
|
||
}
|
||
boolean bl2 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(psiFile);
|
||
if (!bl2) {
|
||
return false;
|
||
}
|
||
XmlTag xmlTag2 = xmlTag = psiElement instanceof XmlTag ? (XmlTag)psiElement : null;
|
||
if (xmlTag == null) {
|
||
return false;
|
||
}
|
||
String string = xmlTag.getName();
|
||
if (!d.var_java_lang_String_a.contains(string)) {
|
||
return false;
|
||
}
|
||
String string2 = xmlTag.getAttributeValue("id");
|
||
if (StringUtils.isBlank((CharSequence)string2)) {
|
||
return false;
|
||
}
|
||
return a.contains(string2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.freemarker.dto;
|
||
|
||
import com.ccnode.codegenerator.freemarker.dto.NewClassFieldInfo;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
|
||
public class GenClassInfo {
|
||
private String classPackageName;
|
||
private String className;
|
||
private Set<String> importList;
|
||
private List<NewClassFieldInfo> classFieldInfos;
|
||
private String classFullPath;
|
||
|
||
public String getClassPackageName() {
|
||
return this.classPackageName;
|
||
}
|
||
|
||
public String getClassFullPath() {
|
||
return this.classFullPath;
|
||
}
|
||
|
||
public void setClassFullPath(String string) {
|
||
this.classFullPath = string;
|
||
}
|
||
|
||
public void setClassPackageName(String string) {
|
||
this.classPackageName = string;
|
||
}
|
||
|
||
public String getClassName() {
|
||
return this.className;
|
||
}
|
||
|
||
public void setClassName(String string) {
|
||
this.className = string;
|
||
}
|
||
|
||
public Set<String> getImportList() {
|
||
return this.importList;
|
||
}
|
||
|
||
public void setImportList(Set<String> set) {
|
||
this.importList = set;
|
||
}
|
||
|
||
public List<NewClassFieldInfo> getClassFieldInfos() {
|
||
return this.classFieldInfos;
|
||
}
|
||
|
||
public void setClassFieldInfos(List<NewClassFieldInfo> list) {
|
||
this.classFieldInfos = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.freemarker.dto;
|
||
|
||
public class NewClassFieldInfo {
|
||
private String fieldName;
|
||
private String fieldShortType;
|
||
|
||
public String getFieldName() {
|
||
return this.fieldName;
|
||
}
|
||
|
||
public void setFieldName(String string) {
|
||
this.fieldName = string;
|
||
}
|
||
|
||
public String getFieldShortType() {
|
||
return this.fieldShortType;
|
||
}
|
||
|
||
public void setFieldShortType(String string) {
|
||
this.fieldShortType = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.freemarker;
|
||
|
||
public class a {
|
||
public static final String a = "insert.ftl";
|
||
public static final String b = "insert_without_test.ftl";
|
||
public static final String c = "insertList.ftl";
|
||
public static final String d = "updateSelective.ftl";
|
||
public static final String e = "updateByPrimaryKey.ftl";
|
||
public static final String f = "gencode/mapperxml.ftl";
|
||
public static final String g = "gencode/dao.ftl";
|
||
public static final String h = "newclass.ftl";
|
||
public static final String i = "gencode/service.ftl";
|
||
public static final String j = "gencode/service_interface.ftl";
|
||
public static final String k = "daoPackageName";
|
||
public static final String l = "pojoFullType";
|
||
public static final String m = "daoType";
|
||
public static final String n = "pojoType";
|
||
public static final String o = "pojoName";
|
||
public static final String p = "collectionName";
|
||
public static final String q = "itemName";
|
||
public static final String r = "fieldAndColumns";
|
||
public static final String s = "useGeneratedKeys";
|
||
public static final String t = "insertSkipPrimaryKey";
|
||
public static final String u = "tableName";
|
||
public static final String v = "addMapperAnnotation";
|
||
public static final String w = "primaryField";
|
||
public static final String x = "primaryColumn";
|
||
public static final String y = "servicePackage";
|
||
public static final String z = "serviceInterfaceFullType";
|
||
public static final String A = "serviceInterfaceName";
|
||
public static final String B = "serviceType";
|
||
public static final String C = "daoName";
|
||
public static final String D = "currentDatabase";
|
||
public static final String E = "primaryJdbcType";
|
||
public static final String F = "daoFullType";
|
||
public static final String G = "classPackage";
|
||
public static final String H = "className";
|
||
public static final String I = "fields";
|
||
public static final String J = "importList";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* freemarker.template.Configuration
|
||
* freemarker.template.Template
|
||
* freemarker.template.TemplateExceptionHandler
|
||
*/
|
||
package com.ccnode.codegenerator.freemarker;
|
||
|
||
import com.ccnode.codegenerator.F.a;
|
||
import com.ccnode.codegenerator.F.c;
|
||
import freemarker.template.Configuration;
|
||
import freemarker.template.Template;
|
||
import freemarker.template.TemplateExceptionHandler;
|
||
import java.io.StringWriter;
|
||
import java.io.Writer;
|
||
import java.util.Map;
|
||
|
||
public class b {
|
||
private static Configuration var_freemarker_template_Configuration_a;
|
||
public static String var_java_lang_String_a;
|
||
private static a var_com_ccnode_codegenerator_F_a_a;
|
||
|
||
public static String a(String string, Map<String, Object> map) {
|
||
try {
|
||
Template template = var_freemarker_template_Configuration_a.getTemplate(string);
|
||
StringWriter stringWriter = new StringWriter();
|
||
template.process(map, (Writer)stringWriter);
|
||
String string2 = stringWriter.toString();
|
||
string2 = string2.replaceAll("\r\n", "\n");
|
||
return string2;
|
||
}
|
||
catch (Exception exception) {
|
||
exception.printStackTrace();
|
||
var_com_ccnode_codegenerator_F_a_a.b("template process catch exception", exception);
|
||
throw new RuntimeException("process freemarker template catch exception", exception);
|
||
}
|
||
}
|
||
|
||
public static String b(String string, Map<String, Object> map) {
|
||
try {
|
||
Template template = var_freemarker_template_Configuration_a.getTemplate(string);
|
||
StringWriter stringWriter = new StringWriter();
|
||
template.process(map, (Writer)stringWriter);
|
||
String string2 = stringWriter.toString();
|
||
string2 = string2.replaceAll("\r\n", var_java_lang_String_a);
|
||
return string2;
|
||
}
|
||
catch (Exception exception) {
|
||
exception.printStackTrace();
|
||
var_com_ccnode_codegenerator_F_a_a.b("template process catch exception", exception);
|
||
throw new RuntimeException("process freemarker template catch exception", exception);
|
||
}
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_a = "\n";
|
||
var_freemarker_template_Configuration_a = new Configuration(Configuration.getVersion());
|
||
try {
|
||
var_freemarker_template_Configuration_a.setClassLoaderForTemplateLoading(b.class.getClassLoader(), "templates");
|
||
}
|
||
catch (Exception exception) {
|
||
throw new RuntimeException(exception);
|
||
}
|
||
var_freemarker_template_Configuration_a.setDefaultEncoding("UTF-8");
|
||
var_freemarker_template_Configuration_a.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
|
||
var_freemarker_template_Configuration_a.setLogTemplateExceptions(false);
|
||
var_com_ccnode_codegenerator_F_a_a = c.var_com_ccnode_codegenerator_F_c_a.a(b.class);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
*/
|
||
package com.ccnode.codegenerator.u;
|
||
|
||
import com.ccnode.codegenerator.ad.m;
|
||
import com.ccnode.codegenerator.freemarker.b;
|
||
import com.ccnode.codegenerator.freemarker.dto.GenClassInfo;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
|
||
public class a {
|
||
public static void a(GenClassInfo genClassInfo) {
|
||
HashMap hashMap = Maps.newHashMap();
|
||
hashMap.put("className", genClassInfo.getClassName());
|
||
hashMap.put("classPackage", genClassInfo.getClassPackageName());
|
||
hashMap.put("fields", genClassInfo.getClassFieldInfos());
|
||
hashMap.put("importList", genClassInfo.getImportList());
|
||
String string = b.a("newclass.ftl", hashMap);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
arrayList.add(string);
|
||
m.a(genClassInfo.getClassFullPath(), arrayList, genClassInfo.getClassName());
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
*/
|
||
package com.ccnode.codegenerator.u;
|
||
|
||
import com.ccnode.codegenerator.ad.m;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.j.a;
|
||
import com.ccnode.codegenerator.n.o;
|
||
import com.ccnode.codegenerator.q.a_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
|
||
public class b {
|
||
public static void a(o o2, a_0 a_02) {
|
||
HashMap hashMap = Maps.newHashMap();
|
||
hashMap.put("daoPackageName", o2.d());
|
||
hashMap.put("pojoFullType", a_02.a());
|
||
hashMap.put("daoType", o2.b());
|
||
hashMap.put("pojoType", a_02.b());
|
||
hashMap.put("pojoName", n.f(a_02.b()));
|
||
hashMap.put("addMapperAnnotation", a.com_ccnode_codegenerator_j_a_a().com_ccnode_codegenerator_myconfigurable_PluginState_a().getDefaultProfile().getAddMapperAnnotation());
|
||
String string = com.ccnode.codegenerator.freemarker.b.a("gencode/dao.ftl", hashMap);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
arrayList.add(string);
|
||
m.a(o2, arrayList);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
*/
|
||
package com.ccnode.codegenerator.u;
|
||
|
||
import com.ccnode.codegenerator.ad.m;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.freemarker.b;
|
||
import com.ccnode.codegenerator.n.o;
|
||
import com.ccnode.codegenerator.q.a_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
|
||
public class d {
|
||
public static void a(o o2, a_0 a_02) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
HashMap hashMap = Maps.newHashMap();
|
||
hashMap.put("servicePackage", o2.d());
|
||
hashMap.put("pojoFullType", a_02.a());
|
||
hashMap.put("serviceType", o2.b());
|
||
hashMap.put("pojoType", a_02.b());
|
||
hashMap.put("pojoName", n.f(a_02.b()));
|
||
String string = b.b("gencode/service_interface.ftl", hashMap);
|
||
arrayList.add(string);
|
||
m.a(o2, arrayList);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
*/
|
||
package com.ccnode.codegenerator.u;
|
||
|
||
import com.ccnode.codegenerator.ad.m;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.freemarker.b;
|
||
import com.ccnode.codegenerator.n.o;
|
||
import com.ccnode.codegenerator.q.a_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
|
||
public class e {
|
||
public static void a(o o2, a_0 a_02, o o3, o o4) {
|
||
String string = n.f(o3.b());
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
HashMap hashMap = Maps.newHashMap();
|
||
hashMap.put("servicePackage", o2.d());
|
||
hashMap.put("pojoFullType", a_02.a());
|
||
hashMap.put("daoFullType", o3.a());
|
||
hashMap.put("serviceType", o2.b());
|
||
hashMap.put("daoType", o3.b());
|
||
hashMap.put("daoName", n.f(o3.b()));
|
||
hashMap.put("pojoType", a_02.b());
|
||
hashMap.put("pojoName", n.f(a_02.b()));
|
||
if (o4 != null) {
|
||
hashMap.put("serviceInterfaceName", o4.b());
|
||
hashMap.put("serviceInterfaceFullType", o4.a());
|
||
}
|
||
String string2 = b.b("gencode/service.ftl", hashMap);
|
||
arrayList.add(string2);
|
||
m.a(o2, arrayList);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.ComboBox
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.v;
|
||
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.v.j;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.ComboBox;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.lang.reflect.Method;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.ResourceBundle;
|
||
import java.util.stream.Collectors;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
public static final String var_java_lang_String_a = "OneToOne";
|
||
public static final String b = "OneToMany";
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private String c;
|
||
private String d;
|
||
private JComboBox var_javax_swing_JComboBox_a;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private j var_com_ccnode_codegenerator_v_j_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public a(Project project, String string, String string2) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.c = string;
|
||
this.d = string2;
|
||
this.b();
|
||
if (string != null) {
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(string);
|
||
}
|
||
if (string2 != null) {
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText(string2);
|
||
}
|
||
this.setTitle("Add RelationShip");
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
Map<String, XmlFile> map = v.a(this.var_com_intellij_openapi_project_Project_a);
|
||
List list = map.keySet().stream().collect(Collectors.toList());
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, list, (boolean)true, null);
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setPreferredWidth(200);
|
||
this.var_javax_swing_JComboBox_a = new ComboBox();
|
||
this.var_javax_swing_JComboBox_a.addItem(var_java_lang_String_a);
|
||
this.var_javax_swing_JComboBox_a.addItem(b);
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(var_java_lang_String_a);
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.var_com_ccnode_codegenerator_v_j_a = new j();
|
||
this.var_com_ccnode_codegenerator_v_j_a.a((String)this.var_javax_swing_JComboBox_a.getSelectedItem());
|
||
this.var_com_ccnode_codegenerator_v_j_a.b(this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText());
|
||
super.doOKAction();
|
||
}
|
||
|
||
public j com_ccnode_codegenerator_v_j_a() {
|
||
return this.var_com_ccnode_codegenerator_v_j_a;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "realtion"), 0, 0, null, null));
|
||
jPanel.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 0, 1, 2, 8, 0, 2, 0, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "relatedxmlfile"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_a, new GridConstraints(1, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.ide.CopyPasteManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.DialogWrapper$IdeModalityType
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.v;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.intellij.openapi.ide.CopyPasteManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.awt.datatransfer.Transferable;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d
|
||
extends DialogWrapper {
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JPanel var_javax_swing_JPanel_b;
|
||
public JTextArea var_javax_swing_JTextArea_a;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public JTextArea var_javax_swing_JTextArea_b;
|
||
|
||
protected d(@Nullable Project project, boolean bl) {
|
||
super(project, bl, DialogWrapper.IdeModalityType.MODELESS);
|
||
this.void_a();
|
||
this.setTitle("Convert sql to mybatis xml");
|
||
this.setOKButtonText("copy");
|
||
this.init();
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = d.this.var_javax_swing_JTextArea_a.getText();
|
||
String string2 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.d(string);
|
||
d.this.var_javax_swing_JTextArea_b.setText(string2);
|
||
}
|
||
});
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
String string = this.var_javax_swing_JTextArea_b.getText();
|
||
CopyPasteManager.getInstance().setContents((Transferable)new StringSelection(string));
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JPanel_b, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.var_javax_swing_JButton_a.setText("convertToMybatisSql");
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
this.var_javax_swing_JPanel_b.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTextArea_a);
|
||
JScrollPane jScrollPane2 = new JScrollPane();
|
||
this.var_javax_swing_JPanel_b.add((Component)jScrollPane2, new GridConstraints(2, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_b = new JTextArea();
|
||
jScrollPane2.setViewportView(this.var_javax_swing_JTextArea_b);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.ide.CopyPasteManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.popup.JBPopupFactory
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.v;
|
||
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.v.l;
|
||
import com.intellij.openapi.ide.CopyPasteManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.awt.datatransfer.Transferable;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class f
|
||
extends DialogWrapper {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JTextArea var_javax_swing_JTextArea_a;
|
||
|
||
protected f(@Nullable Project project, l l2) {
|
||
super(project, true);
|
||
this.void_a();
|
||
this.setTitle("All Column Like Statement");
|
||
String string = t_0.var_com_ccnode_codegenerator_ad_t_0_a.a(l2);
|
||
this.var_javax_swing_JTextArea_a.setText(string);
|
||
this.setOKButtonText("Copy");
|
||
this.init();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
CopyPasteManager.getInstance().setContents((Transferable)new StringSelection(this.var_javax_swing_JTextArea_a.getText()));
|
||
JBPopupFactory.getInstance().createMessage(this.var_javax_swing_JTextArea_a.getText()).showInFocusCenter();
|
||
super.doOKAction();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
jLabel.setText("result:");
|
||
jPanel2.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel.add((Component)jScrollPane, new GridConstraints(1, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTextArea_a);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.ui.AddEditRemovePanel
|
||
* com.intellij.ui.AddEditRemovePanel$TableModel
|
||
* com.intellij.ui.table.JBTable
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.v;
|
||
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.v.a;
|
||
import com.ccnode.codegenerator.v.j;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.ui.AddEditRemovePanel;
|
||
import com.intellij.ui.table.JBTable;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.stream.Collectors;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class g
|
||
extends DialogWrapper {
|
||
private final Project var_com_intellij_openapi_project_Project_a = Lists.newArrayList();
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private List<j> var_java_util_List_com_ccnode_codegenerator_v_j__a;
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
|
||
protected g(@Nullable Project project) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.void_b();
|
||
this.var_javax_swing_JTextField_a.setFocusable(true);
|
||
this.var_javax_swing_JTextField_a.setText("selectByJoinResultMap");
|
||
this.var_javax_swing_JTextField_b.setText("selectByJoin");
|
||
this.setTitle("set up relation");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
Map<String, XmlFile> map = v.a(this.var_com_intellij_openapi_project_Project_a);
|
||
List list = map.keySet().stream().collect(Collectors.toList());
|
||
AddEditRemovePanel.TableModel<j> tableModel = new AddEditRemovePanel.TableModel<j>(){
|
||
|
||
public int getColumnCount() {
|
||
return 2;
|
||
}
|
||
|
||
@Nullable
|
||
public String getColumnName(int n2) {
|
||
if (n2 == 0) {
|
||
return "relationShip";
|
||
}
|
||
if (n2 == 1) {
|
||
return "xml file path";
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public Object a(j j2, int n2) {
|
||
if (n2 == 0) {
|
||
return j2.java_lang_String_a();
|
||
}
|
||
if (n2 == 1) {
|
||
return j2.b();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public /* synthetic */ Object getField(Object object, int n2) {
|
||
return this.a((j)object, n2);
|
||
}
|
||
};
|
||
this.var_javax_swing_JPanel_b = new AddEditRemovePanel<j>((AddEditRemovePanel.TableModel)tableModel, (List)this.var_com_intellij_openapi_project_Project_a){
|
||
|
||
@Nullable
|
||
protected j a() {
|
||
a a2 = new a(g.this.var_com_intellij_openapi_project_Project_a, null, null);
|
||
boolean bl = a2.showAndGet();
|
||
if (bl) {
|
||
return a2.com_ccnode_codegenerator_v_j_a();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
protected boolean boolean_a(j j2) {
|
||
return true;
|
||
}
|
||
|
||
@Nullable
|
||
protected j com_ccnode_codegenerator_v_j_a(j j2) {
|
||
a a2 = new a(g.this.var_com_intellij_openapi_project_Project_a, j2.java_lang_String_a(), j2.b());
|
||
boolean bl = a2.showAndGet();
|
||
if (bl) {
|
||
return a2.com_ccnode_codegenerator_v_j_a();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
protected JBTable createTable() {
|
||
return super.createTable();
|
||
}
|
||
|
||
@Nullable
|
||
protected /* synthetic */ Object editItem(Object object) {
|
||
return this.com_ccnode_codegenerator_v_j_a((j)object);
|
||
}
|
||
|
||
protected /* synthetic */ boolean removeItem(Object object) {
|
||
return this.boolean_a((j)object);
|
||
}
|
||
|
||
@Nullable
|
||
protected /* synthetic */ Object addItem() {
|
||
return this.a();
|
||
}
|
||
};
|
||
}
|
||
|
||
public List<j> a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
public JComponent getPreferredFocusedComponent() {
|
||
return this.var_javax_swing_JTextField_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
if (StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextField_a.getText())) {
|
||
return new ValidationInfo("resultMapId should not be blank");
|
||
}
|
||
if (StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextField_b.getText())) {
|
||
return new ValidationInfo("statementId should not be blank");
|
||
}
|
||
if (this.var_com_intellij_openapi_project_Project_a.isEmpty()) {
|
||
return new ValidationInfo("need at least join other xml");
|
||
}
|
||
return super.doValidate();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.a(this.var_javax_swing_JTextField_a.getText());
|
||
this.b(this.var_javax_swing_JTextField_b.getText());
|
||
super.doOKAction();
|
||
}
|
||
|
||
private void void_b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
jLabel.setText("resultMapId:");
|
||
jPanel.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
jLabel2.setText("statementId");
|
||
jPanel.add((Component)jLabel2, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(1, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(2, 0, 1, 2, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JPanel_b, new GridConstraints(1, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.v;
|
||
|
||
import com.ccnode.codegenerator.v.l;
|
||
|
||
public class j {
|
||
private String var_java_lang_String_a;
|
||
private String b;
|
||
private l var_com_ccnode_codegenerator_v_l_a;
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_java_lang_String_a.equals("OneToOne");
|
||
}
|
||
|
||
public l com_ccnode_codegenerator_v_l_a() {
|
||
return this.var_com_ccnode_codegenerator_v_l_a;
|
||
}
|
||
|
||
public void a(l l2) {
|
||
this.var_com_ccnode_codegenerator_v_l_a = l2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.gson.Gson
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.application.impl.ApplicationImpl
|
||
* com.intellij.openapi.ui.Messages
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.FileUtils
|
||
*/
|
||
package com.ccnode.codegenerator.w;
|
||
|
||
import com.ccnode.codegenerator.af.d.f;
|
||
import com.ccnode.codegenerator.af.f.b;
|
||
import com.ccnode.codegenerator.af.f.c;
|
||
import com.ccnode.codegenerator.af.f.d;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.gson.Gson;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.application.impl.ApplicationImpl;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import java.io.File;
|
||
import java.util.Base64;
|
||
import java.util.Calendar;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.FileUtils;
|
||
|
||
public class a {
|
||
public static void a() {
|
||
Object object;
|
||
Calendar calendar = Calendar.getInstance();
|
||
calendar.add(12, -5);
|
||
boolean bl = true;
|
||
try {
|
||
object = new File(com.ccnode.codegenerator.af.b.a.java_lang_String_a("mybatisCodeHelperPro"));
|
||
String string = FileUtils.readFileToString((File)object, (String)"UTF-8");
|
||
byte[] byArray = null;
|
||
try {
|
||
byArray = d.b(d.java_security_interfaces_RSAPublicKey_a(new String(Base64.getDecoder().decode("TUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDZzUyUjExV0h1MysvNUV2WnhkS0l2a3ovekpnS2VNUUhNLytMVkxSZS9zWUpFQlUxbUUrODc3MmJJckk4UThscldqSHc5cmVjQ1RWVVhXUnhWYXBndk1HYTZ3KzU4STZwYXdSaFhwZDBrRkhUY2xxeUZGWFpoS3ZiQUtoblphRGNuZkJtSkhObTQwR0JFTGpCTmx5MXpha2FIblFmUzF0QlhaSGQwOUV0c2VRSURBUUFC"), Charsets.UTF_8)), Base64.getDecoder().decode(string));
|
||
}
|
||
catch (b b2) {
|
||
byArray = d.b(new c(), Base64.getDecoder().decode(string));
|
||
}
|
||
f f2 = null;
|
||
f2 = (f)new Gson().fromJson(new String(byArray, "UTF-8"), f.class);
|
||
String string2 = f2.java_lang_String_a();
|
||
if (string2.equals("keyNotExist") || string2.equals("feimao") || string2.contains("<22><><CF><D0>") || string2.contains("<22><><BC><A4><BB><EE>")) {
|
||
bl = false;
|
||
} else {
|
||
if (f2.java_lang_Long_a() > calendar.getTime().getTime()) {
|
||
return;
|
||
}
|
||
bl = false;
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
bl = false;
|
||
}
|
||
object = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
((Profile)object).setIfUseNewMapping(((Profile)object).getIfUseNewMapping() + 1);
|
||
if (((Profile)object).getIfUseNewMapping() > Integer.valueOf("100")) {
|
||
((Profile)object).setIfUseNewMapping(Integer.valueOf("80"));
|
||
try {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
Messages.showErrorDialog((String)"<22><><C4><E3><D5><FD>ʹ<DA><CAB9><D3>ƽ<C6><C6BD><E2><B0><E6>MybatisCodeHelperPro<72><6F><B2><E5><BC><FE><A3><AC><BD><AB><BB><E1><C9>ɴ<B3><C9B4><ED><CE>Ĵ<B5><C4B4><FA><C2><EB><BA><CD><D4>ɵ<B3><C9B5>Կ<C4><D4BF><A8><C2>뵽 https://brucege.com/pay/view <20><><B9><BA><C2><F2><D5><FD>", (String)"MybatisCodeHelperPro<72><6F><B2><E5><BC><FE><B7><C7><D5><FD>");
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(false);
|
||
ApplicationImpl applicationImpl = (ApplicationImpl)ApplicationManager.getApplication();
|
||
applicationImpl.exit(true, true);
|
||
}
|
||
});
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.w;
|
||
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class c
|
||
extends PluginAdapter {
|
||
private FullyQualifiedJavaType a = new FullyQualifiedJavaType("com.google.gwt.user.client.rpc.IsSerializable");
|
||
private FullyQualifiedJavaType b = new FullyQualifiedJavaType("java.io.Serializable");
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return true;
|
||
}
|
||
|
||
protected void a(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
topLevelClass.addImportedType(this.b);
|
||
topLevelClass.addSuperInterface(this.b);
|
||
Field field = new Field();
|
||
field.setFinal(true);
|
||
field.setInitializationString("1L");
|
||
field.setName("serialVersionUID");
|
||
field.setStatic(true);
|
||
field.setType(new FullyQualifiedJavaType("long"));
|
||
field.setVisibility(JavaVisibility.PRIVATE);
|
||
topLevelClass.addField(field);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.x;
|
||
|
||
import com.ccnode.codegenerator.x.h;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private JComboBox var_javax_swing_JComboBox_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private List<XmlFile> var_java_util_List_com_intellij_psi_xml_XmlFile__a;
|
||
private XmlFile var_com_intellij_psi_xml_XmlFile_a;
|
||
|
||
public a(Project project, List<XmlFile> list) {
|
||
super(project, false);
|
||
this.void_a();
|
||
this.var_javax_swing_JComboBox_a = list;
|
||
this.setTitle("choose mapper xml file to generate xml");
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
Iterator iterator = this.var_javax_swing_JComboBox_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
XmlFile xmlFile = (XmlFile)iterator.next();
|
||
h h2 = new h(xmlFile);
|
||
this.var_javax_swing_JComboBox_a.addItem(h2);
|
||
}
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(this.var_javax_swing_JComboBox_a.get(0));
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
h h2 = (h)this.var_javax_swing_JComboBox_a.getSelectedItem();
|
||
this.var_com_intellij_psi_xml_XmlFile_a = h2.a();
|
||
super.doOKAction();
|
||
}
|
||
|
||
public List<XmlFile> a() {
|
||
return this.var_javax_swing_JComboBox_a;
|
||
}
|
||
|
||
public XmlFile com_intellij_psi_xml_XmlFile_a() {
|
||
return this.var_com_intellij_psi_xml_XmlFile_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 0, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
*/
|
||
package com.ccnode.codegenerator.x;
|
||
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
|
||
public interface b {
|
||
public PsiClass a(PsiElement var1);
|
||
|
||
public boolean a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
*/
|
||
package com.ccnode.codegenerator.x;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
|
||
public class c {
|
||
private PsiElement var_com_intellij_psi_PsiElement_a;
|
||
private boolean var_boolean_a;
|
||
private PsiFile var_com_intellij_psi_PsiFile_a;
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public PsiFile com_intellij_psi_PsiFile_a() {
|
||
return this.var_com_intellij_psi_PsiFile_a;
|
||
}
|
||
|
||
public void a(PsiFile psiFile) {
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile;
|
||
}
|
||
|
||
public PsiElement com_intellij_psi_PsiElement_a() {
|
||
return this.var_com_intellij_psi_PsiElement_a;
|
||
}
|
||
|
||
public void a(PsiElement psiElement) {
|
||
this.var_com_intellij_psi_PsiElement_a = psiElement;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
*/
|
||
package com.ccnode.codegenerator.x;
|
||
|
||
import com.ccnode.codegenerator.ad.v_0;
|
||
import com.ccnode.codegenerator.x.b;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
|
||
public class f
|
||
implements b {
|
||
@Override
|
||
public PsiClass a(PsiElement psiElement) {
|
||
return v_0.a.a(psiElement);
|
||
}
|
||
|
||
@Override
|
||
public boolean a() {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlFile
|
||
*/
|
||
package com.ccnode.codegenerator.x;
|
||
|
||
import com.ccnode.codegenerator.ad.q_0;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
|
||
public class h {
|
||
private XmlFile a;
|
||
|
||
public h(XmlFile xmlFile) {
|
||
this.a = xmlFile;
|
||
}
|
||
|
||
public String toString() {
|
||
return q_0.a(this.a.getVirtualFile().getCanonicalPath(), this.a.getProject().getBasePath());
|
||
}
|
||
|
||
public XmlFile a() {
|
||
return this.a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ide.util.ClassFilter
|
||
* com.intellij.ide.util.TreeJavaClassChooserDialog
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.x;
|
||
|
||
import com.intellij.ide.util.ClassFilter;
|
||
import com.intellij.ide.util.TreeJavaClassChooserDialog;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class k
|
||
extends TreeJavaClassChooserDialog {
|
||
public k(String string, @NotNull Project project, GlobalSearchScope globalSearchScope, ClassFilter classFilter, @Nullable PsiClass psiClass) {
|
||
super(string, project, globalSearchScope, classFilter, null, psiClass, true);
|
||
this.setCancelButtonText("skip");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* net.n3.nanoxml.IXMLBuilder
|
||
*/
|
||
package com.ccnode.codegenerator.z.a;
|
||
|
||
import com.ccnode.codegenerator.z.a.b;
|
||
import java.io.Reader;
|
||
import net.n3.nanoxml.IXMLBuilder;
|
||
|
||
public class a
|
||
implements IXMLBuilder {
|
||
private String a;
|
||
private String b;
|
||
|
||
public void startBuilding(String string, int n2) throws Exception {
|
||
}
|
||
|
||
public void newProcessingInstruction(String string, Reader reader) throws Exception {
|
||
}
|
||
|
||
public void startElement(String string, String string2, String string3, String string4, int n2) throws Exception {
|
||
if (!string.equals("mapper")) {
|
||
throw new b();
|
||
}
|
||
this.b = "mapper";
|
||
}
|
||
|
||
public void addAttribute(String string, String string2, String string3, String string4, String string5) throws Exception {
|
||
if (this.b != null && string.equals("namespace")) {
|
||
this.a = string4;
|
||
throw new b();
|
||
}
|
||
}
|
||
|
||
public void elementAttributesProcessed(String string, String string2, String string3) throws Exception {
|
||
}
|
||
|
||
public void endElement(String string, String string2, String string3) throws Exception {
|
||
}
|
||
|
||
public void addPCData(Reader reader, String string, int n2) throws Exception {
|
||
}
|
||
|
||
public Object getResult() throws Exception {
|
||
return null;
|
||
}
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* net.n3.nanoxml.XMLException
|
||
*/
|
||
package com.ccnode.codegenerator.z.a;
|
||
|
||
import net.n3.nanoxml.XMLException;
|
||
|
||
public class b
|
||
extends XMLException {
|
||
public b() {
|
||
super("Stop parsing");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Stopwatch
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.fileTypes.StdFileTypes
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.util.ObjectUtils
|
||
* com.intellij.util.indexing.DataIndexer
|
||
* com.intellij.util.indexing.DefaultFileTypeSpecificInputFilter
|
||
* com.intellij.util.indexing.FileBasedIndex$InputFilter
|
||
* com.intellij.util.indexing.FileContent
|
||
* com.intellij.util.indexing.ID
|
||
* com.intellij.util.indexing.ScalarIndexExtension
|
||
* com.intellij.util.io.EnumeratorStringDescriptor
|
||
* com.intellij.util.io.KeyDescriptor
|
||
* com.intellij.util.xml.DomElement
|
||
* com.intellij.util.xml.DomManager
|
||
* gnu.trove.THashMap
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.z;
|
||
|
||
import com.ccnode.codegenerator.F.c;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.ccnode.codegenerator.dom.model.ResultMap;
|
||
import com.ccnode.codegenerator.dom.model.Select;
|
||
import com.ccnode.codegenerator.dom.model.Sql;
|
||
import com.ccnode.codegenerator.j.a;
|
||
import com.google.common.base.Stopwatch;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.util.ObjectUtils;
|
||
import com.intellij.util.indexing.DataIndexer;
|
||
import com.intellij.util.indexing.DefaultFileTypeSpecificInputFilter;
|
||
import com.intellij.util.indexing.FileBasedIndex;
|
||
import com.intellij.util.indexing.FileContent;
|
||
import com.intellij.util.indexing.ID;
|
||
import com.intellij.util.indexing.ScalarIndexExtension;
|
||
import com.intellij.util.io.EnumeratorStringDescriptor;
|
||
import com.intellij.util.io.KeyDescriptor;
|
||
import com.intellij.util.xml.DomElement;
|
||
import com.intellij.util.xml.DomManager;
|
||
import gnu.trove.THashMap;
|
||
import java.util.Collections;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.concurrent.TimeUnit;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b
|
||
extends ScalarIndexExtension<String> {
|
||
public static final ID<String, Void> var_com_intellij_util_indexing_ID_java_lang_String,_java_lang_Void__a;
|
||
private static com.ccnode.codegenerator.F.a var_com_ccnode_codegenerator_F_a_a;
|
||
public static final String var_java_lang_String_a = "java.min$##.myMapperLocations.mapper_666";
|
||
public static final String b = "MybatisMapperNameSpace@";
|
||
public static final String c = "MybatisResultMapId@";
|
||
public static final String d = "MybatisSqlId@";
|
||
public static final String e = "MybatisFilePath@";
|
||
public static final String f = "MybatisSelectReferenceResultMapId@";
|
||
private final DataIndexer<String, Void, FileContent> var_com_intellij_util_indexing_DataIndexer_java_lang_String,_java_lang_Void,_com_intellij_util_indexing_FileContent__a;
|
||
|
||
public b() {
|
||
this.var_com_intellij_util_indexing_ID_java_lang_String,_java_lang_Void__a = new DataIndexer<String, Void, FileContent>(){
|
||
|
||
@NotNull
|
||
public Map<String, Void> a(@NotNull FileContent fileContent) {
|
||
if (!fileContent.getFileName().endsWith(".xml")) {
|
||
return Collections.emptyMap();
|
||
}
|
||
Stopwatch stopwatch = null;
|
||
if (com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getShowIndexTimeUsage()) {
|
||
stopwatch = Stopwatch.createStarted();
|
||
}
|
||
PsiFile psiFile = fileContent.getPsiFile();
|
||
String string = fileContent.getFile().getPath();
|
||
XmlFile xmlFile = (XmlFile)ObjectUtils.tryCast((Object)psiFile, XmlFile.class);
|
||
if (xmlFile == null) {
|
||
return Collections.emptyMap();
|
||
}
|
||
Project project = fileContent.getProject();
|
||
XmlTag xmlTag = xmlFile.getRootTag();
|
||
if (xmlTag == null) {
|
||
return Collections.emptyMap();
|
||
}
|
||
boolean bl = false;
|
||
return b.this.a(stopwatch, xmlFile, project, xmlTag, fileContent);
|
||
}
|
||
|
||
@NotNull
|
||
public /* synthetic */ Map map(@NotNull Object object) {
|
||
return this.a((FileContent)object);
|
||
}
|
||
};
|
||
}
|
||
|
||
private Map<String, Void> a(Stopwatch stopwatch, XmlFile xmlFile, Project project, XmlTag xmlTag, FileContent fileContent) {
|
||
String string = fileContent.getFile().getPath();
|
||
if (!xmlTag.getName().equals("mapper")) {
|
||
return Collections.emptyMap();
|
||
}
|
||
String string2 = xmlTag.getAttributeValue("namespace");
|
||
if (StringUtils.isBlank((CharSequence)string2)) {
|
||
return Collections.emptyMap();
|
||
}
|
||
THashMap tHashMap = new THashMap();
|
||
tHashMap.put(b + string2, null);
|
||
tHashMap.put(var_java_lang_String_a, null);
|
||
tHashMap.put(e + string, null);
|
||
for (XmlTag xmlTag2 : xmlTag.getSubTags()) {
|
||
String string3;
|
||
String string4 = xmlTag2.getName();
|
||
if (string4.equals("resultMap")) {
|
||
string3 = xmlTag2.getAttributeValue("id");
|
||
tHashMap.put(c + string2 + "." + string3, null);
|
||
continue;
|
||
}
|
||
if (string4.equals("sql")) {
|
||
string3 = xmlTag2.getAttributeValue("id");
|
||
tHashMap.put(d + string2 + "." + string3, null);
|
||
continue;
|
||
}
|
||
if (!string4.equals("select") || (string3 = xmlTag2.getAttributeValue("resultMap")) == null) continue;
|
||
if (string3.contains(".")) {
|
||
tHashMap.put(f + string3, null);
|
||
continue;
|
||
}
|
||
tHashMap.put(f + string2 + "." + string3, null);
|
||
}
|
||
if (com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getShowIndexTimeUsage()) {
|
||
long l2 = stopwatch.elapsed(TimeUnit.MICROSECONDS);
|
||
System.out.println("build from xml file time used in MICROSECONDS for " + xmlFile.getName() + " is: " + l2 + " MICROSECONDS");
|
||
}
|
||
return tHashMap;
|
||
}
|
||
|
||
@NotNull
|
||
private Map<String, Void> b(Stopwatch stopwatch, XmlFile xmlFile, Project project, XmlTag xmlTag, FileContent fileContent) {
|
||
DomElement domElement = DomManager.getDomManager((Project)project).getDomElement(xmlTag);
|
||
if (domElement == null) {
|
||
return Collections.emptyMap();
|
||
}
|
||
Mapper mapper = (Mapper)ObjectUtils.tryCast((Object)domElement, Mapper.class);
|
||
if (mapper == null) {
|
||
return Collections.emptyMap();
|
||
}
|
||
String string = mapper.getNamespace().getStringValue();
|
||
if (string != null) {
|
||
String string2;
|
||
THashMap tHashMap = new THashMap();
|
||
tHashMap.put(b + string, null);
|
||
tHashMap.put(var_java_lang_String_a, null);
|
||
tHashMap.put(e + fileContent.getFile().getPath(), null);
|
||
List<ResultMap> list = mapper.getResultMaps();
|
||
for (ResultMap idDomElement : list) {
|
||
string2 = idDomElement.getId().getStringValue();
|
||
tHashMap.put(c + string + "." + string2, null);
|
||
}
|
||
for (Sql sql : mapper.getSqls()) {
|
||
string2 = sql.getId().getStringValue();
|
||
tHashMap.put(d + string + "." + string2, null);
|
||
}
|
||
for (Select select : mapper.getSelects()) {
|
||
string2 = select.getResultMap().getStringValue();
|
||
if (string2 == null) continue;
|
||
if (string2.contains(".")) {
|
||
tHashMap.put(f + string2, null);
|
||
continue;
|
||
}
|
||
tHashMap.put(f + string + "." + string2, null);
|
||
}
|
||
if (com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getShowIndexTimeUsage()) {
|
||
long l2 = stopwatch.elapsed(TimeUnit.MICROSECONDS);
|
||
System.out.println("mapper file time used in MICROSECONDS for " + xmlFile.getName() + " is: " + l2 + " MICROSECONDS");
|
||
}
|
||
return tHashMap;
|
||
}
|
||
return Collections.emptyMap();
|
||
}
|
||
|
||
@NotNull
|
||
public ID<String, Void> getName() {
|
||
return var_com_intellij_util_indexing_ID_java_lang_String,_java_lang_Void__a;
|
||
}
|
||
|
||
@NotNull
|
||
public DataIndexer<String, Void, FileContent> getIndexer() {
|
||
return this.var_com_intellij_util_indexing_ID_java_lang_String,_java_lang_Void__a;
|
||
}
|
||
|
||
@NotNull
|
||
public KeyDescriptor<String> getKeyDescriptor() {
|
||
return EnumeratorStringDescriptor.INSTANCE;
|
||
}
|
||
|
||
public int getVersion() {
|
||
return 7;
|
||
}
|
||
|
||
@NotNull
|
||
public FileBasedIndex.InputFilter getInputFilter() {
|
||
return new DefaultFileTypeSpecificInputFilter(new FileType[]{StdFileTypes.XML});
|
||
}
|
||
|
||
public boolean dependsOnFileContent() {
|
||
return true;
|
||
}
|
||
|
||
static {
|
||
var_com_intellij_util_indexing_ID_java_lang_String,_java_lang_Void__a = ID.create((String)"MybatisCodeHelperIndexer6");
|
||
var_com_ccnode_codegenerator_F_a_a = com.ccnode.codegenerator.F.c.var_com_ccnode_codegenerator_F_c_a.a(b.class);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.ccnode.codegenerator.A.a
|
||
* com.sun.jna.Structure
|
||
* com.sun.jna.Structure$ByReference
|
||
* com.sun.jna.Structure$ByValue
|
||
*/
|
||
package com.ccnode.codegenerator.a;
|
||
|
||
import com.sun.jna.Structure;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.A.a
|
||
*/
|
||
public class a_0
|
||
extends Structure {
|
||
public String var_java_lang_String_a;
|
||
public long var_long_a;
|
||
|
||
public a_0() {
|
||
}
|
||
|
||
public a_0(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_long_a = string.length();
|
||
}
|
||
|
||
public String a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
protected List<String> getFieldOrder() {
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
arrayList.add("str");
|
||
arrayList.add("length");
|
||
return arrayList;
|
||
}
|
||
|
||
public static class a
|
||
extends com.ccnode.codegenerator.A.a
|
||
implements Structure.ByReference {
|
||
public a() {
|
||
}
|
||
|
||
public a(String string) {
|
||
super(string);
|
||
}
|
||
}
|
||
|
||
public static class b
|
||
extends com.ccnode.codegenerator.A.a
|
||
implements Structure.ByValue {
|
||
public b() {
|
||
}
|
||
|
||
public b(String string) {
|
||
super(string);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.sun.jna.Library
|
||
*/
|
||
package com.ccnode.codegenerator.a;
|
||
|
||
import com.ccnode.codegenerator.a.a_0;
|
||
import com.sun.jna.Library;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.A.b
|
||
*/
|
||
public interface b_0
|
||
extends Library {
|
||
public int a(int var1, int var2);
|
||
|
||
public String a(a_0.b var1, a_0.b var2);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.util.PsiTreeUtil
|
||
* com.intellij.util.IncorrectOperationException
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.kotlin.psi.KtClass
|
||
* org.jetbrains.kotlin.psi.KtClassBody
|
||
* org.jetbrains.kotlin.psi.KtFile
|
||
* org.jetbrains.uast.UClass
|
||
* org.jetbrains.uast.UElement
|
||
* org.jetbrains.uast.UastContextKt
|
||
*/
|
||
package com.ccnode.codegenerator.b;
|
||
|
||
import com.ccnode.codegenerator.ag.i.i;
|
||
import com.ccnode.codegenerator.ag.i.q;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.util.PsiTreeUtil;
|
||
import com.intellij.util.IncorrectOperationException;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.kotlin.psi.KtClass;
|
||
import org.jetbrains.kotlin.psi.KtClassBody;
|
||
import org.jetbrains.kotlin.psi.KtFile;
|
||
import org.jetbrains.uast.UClass;
|
||
import org.jetbrains.uast.UElement;
|
||
import org.jetbrains.uast.UastContextKt;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.B.a
|
||
*/
|
||
public class a_0
|
||
extends q {
|
||
public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement psiElement) throws IncorrectOperationException {
|
||
KtClass ktClass = (KtClass)PsiTreeUtil.getParentOfType((PsiElement)psiElement, KtClass.class, (boolean)false);
|
||
UElement uElement = UastContextKt.toUElement((PsiElement)ktClass);
|
||
if (uElement instanceof UClass) {
|
||
PsiClass psiClass;
|
||
UClass uClass = (UClass)uElement;
|
||
PsiClass psiClass2 = psiClass = uClass.getJavaPsi();
|
||
i.a(project, editor, psiClass2);
|
||
}
|
||
}
|
||
|
||
public boolean startInWriteAction() {
|
||
return false;
|
||
}
|
||
|
||
public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement psiElement) {
|
||
PsiFile psiFile = psiElement.getContainingFile();
|
||
if (!(psiFile instanceof KtFile)) {
|
||
return false;
|
||
}
|
||
KtClass ktClass = (KtClass)PsiTreeUtil.getParentOfType((PsiElement)psiElement, KtClass.class, (boolean)false);
|
||
if (ktClass == null) {
|
||
return false;
|
||
}
|
||
if (!ktClass.isInterface()) {
|
||
return false;
|
||
}
|
||
KtClassBody ktClassBody = ktClass.getBody();
|
||
if (ktClassBody == null) {
|
||
return false;
|
||
}
|
||
return psiElement.getTextOffset() < ktClassBody.getTextOffset();
|
||
}
|
||
|
||
@NotNull
|
||
public String getText() {
|
||
return "Generate mybatis xml for current class";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiMethod
|
||
*/
|
||
package com.ccnode.codegenerator.c;
|
||
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiMethod;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.C.a
|
||
*/
|
||
public interface a_0 {
|
||
public static final ExtensionPointName<a_0> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.kotlinChecker");
|
||
|
||
public PsiMethod a(PsiElement var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.codeStyle.lineIndent.LineIndentProvider
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.d;
|
||
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.codeStyle.lineIndent.LineIndentProvider;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.D.a
|
||
*/
|
||
public class a_0
|
||
implements LineIndentProvider {
|
||
@Nullable
|
||
public String getLineIndent(@NotNull Project project, @NotNull Editor editor, @Nullable Language language, int n2) {
|
||
return null;
|
||
}
|
||
|
||
public boolean isSuitableFor(@Nullable Language language) {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiClass
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.E;
|
||
|
||
import com.intellij.psi.PsiClass;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public abstract class a {
|
||
public abstract boolean a(@NotNull PsiClass var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiJavaFile
|
||
* com.intellij.psi.PsiPackage
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.E;
|
||
|
||
import com.ccnode.codegenerator.E.e;
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiJavaFile;
|
||
import com.intellij.psi.PsiPackage;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class c
|
||
extends e {
|
||
@Override
|
||
@NotNull
|
||
public Set<PsiPackage> a(@NotNull Project project) {
|
||
HashSet hashSet = Sets.newHashSet();
|
||
Collection<Mapper> collection = v.b(project);
|
||
JavaPsiFacade javaPsiFacade = JavaPsiFacade.getInstance((Project)project);
|
||
for (Mapper mapper : collection) {
|
||
String string;
|
||
PsiPackage psiPackage;
|
||
PsiFile psiFile;
|
||
String string2 = v.a(mapper);
|
||
PsiClass psiClass = javaPsiFacade.findClass(string2, GlobalSearchScope.allScope((Project)project));
|
||
if (null == psiClass || !((psiFile = psiClass.getContainingFile()) instanceof PsiJavaFile) || null == (psiPackage = javaPsiFacade.findPackage(string = ((PsiJavaFile)psiFile).getPackageName()))) continue;
|
||
hashSet.add(psiPackage);
|
||
}
|
||
return hashSet;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiJavaFile
|
||
* com.intellij.psi.PsiPackage
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.E;
|
||
|
||
import com.ccnode.codegenerator.E.a;
|
||
import com.ccnode.codegenerator.E.c;
|
||
import com.ccnode.codegenerator.E.e;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiJavaFile;
|
||
import com.intellij.psi.PsiPackage;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class d
|
||
extends a {
|
||
private e a = new c();
|
||
|
||
@Override
|
||
public boolean a(@NotNull PsiClass psiClass) {
|
||
String string = ((PsiJavaFile)psiClass.getContainingFile()).getPackageName();
|
||
PsiPackage psiPackage = JavaPsiFacade.getInstance((Project)psiClass.getProject()).findPackage(string);
|
||
return this.a.a(psiClass.getProject()).stream().anyMatch(psiPackage2 -> psiPackage2.equals(psiPackage));
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiPackage
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.E;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiPackage;
|
||
import java.util.Set;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public abstract class e {
|
||
@NotNull
|
||
public abstract Set<PsiPackage> a(@NotNull Project var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.F.a;
|
||
|
||
import com.ccnode.codegenerator.F.a.d;
|
||
import com.ccnode.codegenerator.F.b;
|
||
import com.ccnode.codegenerator.F.e;
|
||
|
||
public class a
|
||
extends d {
|
||
public a(d d2) {
|
||
super(d2);
|
||
}
|
||
|
||
@Override
|
||
public void a(b b2) {
|
||
if (b2.com_ccnode_codegenerator_F_e_a() == e.b) {
|
||
// empty if block
|
||
}
|
||
super.a(b2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.gson.Gson
|
||
* okhttp3.MediaType
|
||
* okhttp3.OkHttpClient
|
||
* okhttp3.Request
|
||
* okhttp3.Request$Builder
|
||
* okhttp3.RequestBody
|
||
* okhttp3.Response
|
||
*/
|
||
package com.ccnode.codegenerator.F.a;
|
||
|
||
import com.ccnode.codegenerator.q.f;
|
||
import com.ccnode.codegenerator.u.a_0;
|
||
import com.google.gson.Gson;
|
||
import java.util.concurrent.ExecutorService;
|
||
import java.util.concurrent.Executors;
|
||
import java.util.concurrent.TimeUnit;
|
||
import okhttp3.MediaType;
|
||
import okhttp3.OkHttpClient;
|
||
import okhttp3.Request;
|
||
import okhttp3.RequestBody;
|
||
import okhttp3.Response;
|
||
|
||
public class b {
|
||
private static OkHttpClient var_okhttp3_OkHttpClient_a;
|
||
private static ExecutorService var_java_util_concurrent_ExecutorService_a;
|
||
private static String var_java_lang_String_a;
|
||
public static final MediaType var_okhttp3_MediaType_a;
|
||
private static Gson var_com_google_gson_Gson_a;
|
||
|
||
public static void a(a_0 a_02) {
|
||
var_java_util_concurrent_ExecutorService_a.submit(() -> {
|
||
String string = var_com_google_gson_Gson_a.toJson((Object)a_02);
|
||
RequestBody requestBody = RequestBody.create((MediaType)var_okhttp3_MediaType_a, (String)string);
|
||
Request request = new Request.Builder().url(var_java_lang_String_a).post(requestBody).build();
|
||
try (Response response = null;){
|
||
response = var_okhttp3_OkHttpClient_a.newCall(request).execute();
|
||
}
|
||
});
|
||
}
|
||
|
||
static {
|
||
var_okhttp3_OkHttpClient_a = new OkHttpClient().newBuilder().connectTimeout(5L, TimeUnit.SECONDS).readTimeout(5L, TimeUnit.SECONDS).build();
|
||
var_java_util_concurrent_ExecutorService_a = Executors.newFixedThreadPool(1);
|
||
var_java_lang_String_a = f.a + "mybatislog/add";
|
||
var_okhttp3_MediaType_a = MediaType.parse((String)"application/json; charset=utf-8");
|
||
var_com_google_gson_Gson_a = new Gson();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.F.a;
|
||
|
||
import com.ccnode.codegenerator.F.a.d;
|
||
import com.ccnode.codegenerator.F.b;
|
||
|
||
public class c
|
||
extends d {
|
||
public c(d d2) {
|
||
super(d2);
|
||
}
|
||
|
||
@Override
|
||
public void a(b b2) {
|
||
super.a(b2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.F.a;
|
||
|
||
import com.ccnode.codegenerator.F.b;
|
||
|
||
public abstract class d {
|
||
private d a;
|
||
|
||
public d(d d2) {
|
||
this.a = d2;
|
||
}
|
||
|
||
public void a(b b2) {
|
||
if (this.a != null) {
|
||
this.a.a(b2);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.application.ApplicationInfo
|
||
* org.apache.commons.lang.StringUtils
|
||
*/
|
||
package com.ccnode.codegenerator.F.a;
|
||
|
||
import com.ccnode.codegenerator.i.b;
|
||
import com.intellij.openapi.application.ApplicationInfo;
|
||
import java.io.PrintWriter;
|
||
import java.io.StringWriter;
|
||
import org.apache.commons.lang.StringUtils;
|
||
|
||
public class e {
|
||
static String a(String string, Exception exception) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (StringUtils.isEmpty((String)string)) {
|
||
stringBuilder.append("the message is empty");
|
||
} else {
|
||
stringBuilder.append("the message is " + string);
|
||
}
|
||
if (exception != null) {
|
||
stringBuilder.append(" the exception cause:");
|
||
StringWriter stringWriter = new StringWriter();
|
||
PrintWriter printWriter = new PrintWriter(stringWriter);
|
||
exception.printStackTrace(printWriter);
|
||
printWriter.flush();
|
||
stringBuilder.append(stringWriter.toString());
|
||
}
|
||
stringBuilder.append(" the system os is:" + System.getProperty("os.name"));
|
||
stringBuilder.append(" the intellij version is:" + ApplicationInfo.getInstance().getBuild().asString());
|
||
stringBuilder.append(" the currentVersion are:" + b.a());
|
||
return stringBuilder.toString();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
*/
|
||
package com.ccnode.codegenerator.F.a;
|
||
|
||
import com.ccnode.codegenerator.F.a.d;
|
||
import com.ccnode.codegenerator.F.a.e;
|
||
import com.ccnode.codegenerator.F.b;
|
||
import com.ccnode.codegenerator.u.a_0;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
|
||
public class f
|
||
extends d {
|
||
public f(d d2) {
|
||
super(d2);
|
||
}
|
||
|
||
@Override
|
||
public void a(b b2) {
|
||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||
return;
|
||
}
|
||
this.b(b2);
|
||
super.a(b2);
|
||
}
|
||
|
||
public void b(b b2) {
|
||
a_0 a_02 = new a_0();
|
||
a_02.b(b2.java_lang_String_a());
|
||
a_02.a(b2.com_ccnode_codegenerator_F_e_a().name());
|
||
a_02.c(e.a(b2.b(), b2.java_lang_Exception_a()));
|
||
com.ccnode.codegenerator.F.a.b.a(a_02);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.F;
|
||
|
||
public interface a {
|
||
public String a();
|
||
|
||
public void a(Exception var1);
|
||
|
||
public void b(Exception var1);
|
||
|
||
public void a(String var1);
|
||
|
||
public void a(String var1, Exception var2);
|
||
|
||
public void b(String var1, Exception var2);
|
||
|
||
public void b(String var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.F;
|
||
|
||
import com.ccnode.codegenerator.F.e;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class b {
|
||
private String var_java_lang_String_a;
|
||
private Exception var_java_lang_Exception_a;
|
||
private String b;
|
||
private e var_com_ccnode_codegenerator_F_e_a;
|
||
|
||
@NotNull
|
||
public String java_lang_String_a() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
@Nullable
|
||
public String b() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
@Nullable
|
||
public Exception java_lang_Exception_a() {
|
||
return this.var_java_lang_Exception_a;
|
||
}
|
||
|
||
public void a(Exception exception) {
|
||
this.var_java_lang_Exception_a = exception;
|
||
}
|
||
|
||
@NotNull
|
||
public e com_ccnode_codegenerator_F_e_a() {
|
||
return this.var_com_ccnode_codegenerator_F_e_a;
|
||
}
|
||
|
||
public void a(e e2) {
|
||
this.var_com_ccnode_codegenerator_F_e_a = e2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.F;
|
||
|
||
public final class e
|
||
extends Enum<e> {
|
||
public static final /* enum */ e var_com_ccnode_codegenerator_F_e_a;
|
||
public static final /* enum */ e b;
|
||
private static final /* synthetic */ e[] var_com_ccnode_codegenerator_F_e_arr_a;
|
||
|
||
public static e[] a() {
|
||
return (e[])var_com_ccnode_codegenerator_F_e_arr_a.clone();
|
||
}
|
||
|
||
public static e a(String string) {
|
||
return Enum.valueOf(e.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ e[] b() {
|
||
return new e[]{var_com_ccnode_codegenerator_F_e_a, b};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_F_e_a = new e();
|
||
b = new e();
|
||
var_com_ccnode_codegenerator_F_e_arr_a = e.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.F;
|
||
|
||
import com.ccnode.codegenerator.F.a;
|
||
import com.ccnode.codegenerator.F.b;
|
||
import com.ccnode.codegenerator.F.e;
|
||
|
||
public class d
|
||
implements a {
|
||
private String var_java_lang_String_a;
|
||
private com.ccnode.codegenerator.F.a.d var_com_ccnode_codegenerator_F_a_d_a;
|
||
|
||
public d(String string, com.ccnode.codegenerator.F.a.d d2) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_ccnode_codegenerator_F_a_d_a = d2;
|
||
}
|
||
|
||
@Override
|
||
public String a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
@Override
|
||
public void a(Exception exception) {
|
||
b b2 = new b();
|
||
b2.a(this.var_java_lang_String_a);
|
||
b2.a(exception);
|
||
b2.a(e.var_com_ccnode_codegenerator_F_e_a);
|
||
this.var_com_ccnode_codegenerator_F_a_d_a.a(b2);
|
||
}
|
||
|
||
@Override
|
||
public void b(Exception exception) {
|
||
b b2 = new b();
|
||
b2.a(this.var_java_lang_String_a);
|
||
b2.a(exception);
|
||
b2.a(e.b);
|
||
this.var_com_ccnode_codegenerator_F_a_d_a.a(b2);
|
||
}
|
||
|
||
@Override
|
||
public void a(String string) {
|
||
b b2 = new b();
|
||
b2.a(this.var_java_lang_String_a);
|
||
b2.b(string);
|
||
b2.a(e.var_com_ccnode_codegenerator_F_e_a);
|
||
this.var_com_ccnode_codegenerator_F_a_d_a.a(b2);
|
||
}
|
||
|
||
@Override
|
||
public void a(String string, Exception exception) {
|
||
b b2 = new b();
|
||
b2.a(this.var_java_lang_String_a);
|
||
b2.b(string);
|
||
b2.a(exception);
|
||
b2.a(e.var_com_ccnode_codegenerator_F_e_a);
|
||
this.var_com_ccnode_codegenerator_F_a_d_a.a(b2);
|
||
}
|
||
|
||
@Override
|
||
public void b(String string, Exception exception) {
|
||
b b2 = new b();
|
||
b2.b(string);
|
||
b2.a(this.var_java_lang_String_a);
|
||
b2.a(exception);
|
||
b2.a(e.b);
|
||
this.var_com_ccnode_codegenerator_F_a_d_a.a(b2);
|
||
}
|
||
|
||
@Override
|
||
public void b(String string) {
|
||
b b2 = new b();
|
||
b2.a(this.var_java_lang_String_a);
|
||
b2.b(string);
|
||
b2.a(e.b);
|
||
this.var_com_ccnode_codegenerator_F_a_d_a.a(b2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.xml.XmlFile
|
||
*/
|
||
package com.ccnode.codegenerator.G.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.c;
|
||
import com.ccnode.codegenerator.G.d.d.d;
|
||
import com.ccnode.codegenerator.q.e_0;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import java.util.Map;
|
||
|
||
public class a {
|
||
private c var_com_ccnode_codegenerator_G_a_c_a;
|
||
private String var_java_lang_String_a;
|
||
private e_0 var_com_ccnode_codegenerator_q_e_0_a;
|
||
private XmlFile var_com_intellij_psi_xml_XmlFile_a;
|
||
private String b;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private PsiClass var_com_intellij_psi_PsiClass_a;
|
||
private String c;
|
||
private Map<String, String> var_java_util_Map_java_lang_String,_java_lang_String__a;
|
||
private String d;
|
||
private d var_com_ccnode_codegenerator_G_d_d_d_a;
|
||
private com.ccnode.codegenerator.G.d.e.d var_com_ccnode_codegenerator_G_d_e_d_a;
|
||
private com.ccnode.codegenerator.G.d.c.a var_com_ccnode_codegenerator_G_d_c_a_a;
|
||
private com.ccnode.codegenerator.G.d.b.a var_com_ccnode_codegenerator_G_d_b_a_a;
|
||
private String e;
|
||
private String f;
|
||
private boolean var_boolean_a;
|
||
private String g = "MybatisPlusWrapper";
|
||
|
||
public String java_lang_String_a() {
|
||
return this.e;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.e = string;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public PsiClass com_intellij_psi_PsiClass_a() {
|
||
return this.var_com_intellij_psi_PsiClass_a;
|
||
}
|
||
|
||
public void a(PsiClass psiClass) {
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
}
|
||
|
||
public c com_ccnode_codegenerator_G_a_c_a() {
|
||
return this.var_com_ccnode_codegenerator_G_a_c_a;
|
||
}
|
||
|
||
public void a(c c2) {
|
||
this.var_com_ccnode_codegenerator_G_a_c_a = c2;
|
||
}
|
||
|
||
public String b() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public e_0 com_ccnode_codegenerator_q_e_0_a() {
|
||
return this.var_com_ccnode_codegenerator_q_e_0_a;
|
||
}
|
||
|
||
public void a(e_0 e_02) {
|
||
this.var_com_ccnode_codegenerator_q_e_0_a = e_02;
|
||
}
|
||
|
||
public String c() {
|
||
return this.c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.c = string;
|
||
}
|
||
|
||
public Map<String, String> a() {
|
||
return this.var_com_ccnode_codegenerator_G_a_c_a;
|
||
}
|
||
|
||
public void a(Map<String, String> map) {
|
||
this.var_com_ccnode_codegenerator_G_a_c_a = map;
|
||
}
|
||
|
||
public String d() {
|
||
return this.d;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.d = string;
|
||
}
|
||
|
||
public d com_ccnode_codegenerator_G_d_d_d_a() {
|
||
return this.var_com_ccnode_codegenerator_G_d_d_d_a;
|
||
}
|
||
|
||
public void a(d d2) {
|
||
this.var_com_ccnode_codegenerator_G_d_d_d_a = d2;
|
||
}
|
||
|
||
public com.ccnode.codegenerator.G.d.e.d com_ccnode_codegenerator_G_d_e_d_a() {
|
||
return this.var_com_ccnode_codegenerator_G_d_e_d_a;
|
||
}
|
||
|
||
public void a(com.ccnode.codegenerator.G.d.e.d d2) {
|
||
this.var_com_ccnode_codegenerator_G_d_e_d_a = d2;
|
||
}
|
||
|
||
public com.ccnode.codegenerator.G.d.c.a com_ccnode_codegenerator_G_d_c_a_a() {
|
||
return this.var_com_ccnode_codegenerator_G_d_c_a_a;
|
||
}
|
||
|
||
public void a(com.ccnode.codegenerator.G.d.c.a a2) {
|
||
this.var_com_ccnode_codegenerator_G_d_c_a_a = a2;
|
||
}
|
||
|
||
public com.ccnode.codegenerator.G.d.b.a com_ccnode_codegenerator_G_d_b_a_a() {
|
||
return this.var_com_ccnode_codegenerator_G_d_b_a_a;
|
||
}
|
||
|
||
public void a(com.ccnode.codegenerator.G.d.b.a a2) {
|
||
this.var_com_ccnode_codegenerator_G_d_b_a_a = a2;
|
||
}
|
||
|
||
public XmlFile com_intellij_psi_xml_XmlFile_a() {
|
||
return this.var_com_intellij_psi_xml_XmlFile_a;
|
||
}
|
||
|
||
public void a(XmlFile xmlFile) {
|
||
this.var_com_intellij_psi_xml_XmlFile_a = xmlFile;
|
||
}
|
||
|
||
public String e() {
|
||
return this.b;
|
||
}
|
||
|
||
public void e(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String f() {
|
||
return this.f;
|
||
}
|
||
|
||
public void f(String string) {
|
||
this.f = string;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public String g() {
|
||
return this.g;
|
||
}
|
||
|
||
public void g(String string) {
|
||
this.g = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.a;
|
||
|
||
import java.beans.ConstructorProperties;
|
||
|
||
public class b {
|
||
private String a;
|
||
private String b;
|
||
private String c;
|
||
private String d;
|
||
|
||
@ConstructorProperties(value={"paramType", "paramAnno", "paramValue", "paramFullType"})
|
||
public b(String string, String string2, String string3, String string4) {
|
||
this.a = string;
|
||
this.b = string2;
|
||
this.c = string3;
|
||
this.d = string4;
|
||
}
|
||
|
||
public static a com_ccnode_codegenerator_G_a_b$a_a() {
|
||
return new a();
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public String c() {
|
||
return this.c;
|
||
}
|
||
|
||
public String d() {
|
||
return this.d;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.c = string;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.d = string;
|
||
}
|
||
|
||
public static class a {
|
||
private String a;
|
||
private String b;
|
||
private String c;
|
||
private String d;
|
||
|
||
a() {
|
||
}
|
||
|
||
public a a(String string) {
|
||
this.a = string;
|
||
return this;
|
||
}
|
||
|
||
public a b(String string) {
|
||
this.b = string;
|
||
return this;
|
||
}
|
||
|
||
public a c(String string) {
|
||
this.c = string;
|
||
return this;
|
||
}
|
||
|
||
public a d(String string) {
|
||
this.d = string;
|
||
return this;
|
||
}
|
||
|
||
public b a() {
|
||
return new b(this.a, this.b, this.c, this.d);
|
||
}
|
||
|
||
public String toString() {
|
||
return "ParamInfo.ParamInfoBuilder(paramType=" + this.a + ", paramAnno=" + this.b + ", paramValue=" + this.c + ", paramFullType=" + this.d + ")";
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.a;
|
||
|
||
public final class c
|
||
extends Enum<c> {
|
||
public static final /* enum */ c var_com_ccnode_codegenerator_G_a_c_a;
|
||
public static final /* enum */ c b;
|
||
public static final /* enum */ c c;
|
||
public static final /* enum */ c d;
|
||
public static final /* enum */ c e;
|
||
private static final /* synthetic */ c[] var_com_ccnode_codegenerator_G_a_c_arr_a;
|
||
|
||
public static c[] a() {
|
||
return (c[])var_com_ccnode_codegenerator_G_a_c_arr_a.clone();
|
||
}
|
||
|
||
public static c a(String string) {
|
||
return Enum.valueOf(c.class, string);
|
||
}
|
||
|
||
private static /* synthetic */ c[] b() {
|
||
return new c[]{var_com_ccnode_codegenerator_G_a_c_a, b, c, d, e};
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_G_a_c_a = new c();
|
||
b = new c();
|
||
c = new c();
|
||
d = new c();
|
||
e = new c();
|
||
var_com_ccnode_codegenerator_G_a_c_arr_a = com.ccnode.codegenerator.G.a.c.b();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* org.apache.commons.lang.StringUtils
|
||
*/
|
||
package com.ccnode.codegenerator.G.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.a;
|
||
import com.ccnode.codegenerator.G.a.c;
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
import com.ccnode.codegenerator.G.d.a.b;
|
||
import com.ccnode.codegenerator.G.d.e.f;
|
||
import com.ccnode.codegenerator.Q.g;
|
||
import com.ccnode.codegenerator.ad.k_0;
|
||
import com.ccnode.codegenerator.ad.x_0;
|
||
import com.ccnode.codegenerator.g.b_0;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import org.apache.commons.lang.StringUtils;
|
||
|
||
public class d {
|
||
public static b_0 a(List<com.ccnode.codegenerator.G.d.d.d> list, List<com.ccnode.codegenerator.G.d.d.f> list2, g g2) {
|
||
Object object;
|
||
b_0 b_02 = new b_0();
|
||
if (list.size() == 0) {
|
||
b_02.b(false);
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
for (com.ccnode.codegenerator.G.d.d.f f2 : list2) {
|
||
String string = d.a(f2);
|
||
arrayList.add(string);
|
||
}
|
||
b_02.a(arrayList);
|
||
return b_02;
|
||
}
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
com.ccnode.codegenerator.G.d.d.d d2 = null;
|
||
if (list.size() > 1) {
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
arrayList.add(list.get(i2).java_lang_String_a());
|
||
}
|
||
object = new com.ccnode.codegenerator.n.c(g2.com_intellij_openapi_project_Project_a(), arrayList);
|
||
boolean bl = object.showAndGet();
|
||
if (!bl) {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
return b_02;
|
||
}
|
||
d2 = list.get(((com.ccnode.codegenerator.n.c)((Object)object)).a());
|
||
} else {
|
||
d2 = list.get(0);
|
||
}
|
||
d.a((com.ccnode.codegenerator.G.d.a.a)d2, g2);
|
||
object = g2.g();
|
||
e e2 = com.ccnode.codegenerator.l.b.a(object).com_ccnode_codegenerator_l_a_f_a().a(d.a(d2, g2));
|
||
if (e2 != null) {
|
||
b_02.a(e2);
|
||
b_02.b(true);
|
||
} else {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
}
|
||
return b_02;
|
||
}
|
||
|
||
private static void a(com.ccnode.codegenerator.G.d.a.a a2, g g2) {
|
||
Profile profile = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
String string = g2.g();
|
||
if (ApplicationManager.getApplication().isUnitTestMode() && com.ccnode.codegenerator.l.b.boolean_a()) {
|
||
d.a(a2, g2, profile);
|
||
return;
|
||
}
|
||
if (a2.boolean_a()) {
|
||
d.a(a2, g2, profile);
|
||
return;
|
||
}
|
||
if (!com.ccnode.codegenerator.ad.f.a(a2.a()) && com.ccnode.codegenerator.l.b.boolean_a()) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (com.ccnode.codegenerator.G.d.a.c c2 : a2.a()) {
|
||
k_0 k_02 = x_0.a.a(c2.b(), c2.a(), g2.com_ccnode_codegenerator_q_e_0_a(), profile, false, string);
|
||
List<String> list = k_02.a();
|
||
arrayList.addAll(list);
|
||
}
|
||
if (arrayList.size() == 0) {
|
||
return;
|
||
}
|
||
Object object = new com.ccnode.codegenerator.G.b.a(g2, a2);
|
||
boolean bl = object.showAndGet();
|
||
return;
|
||
}
|
||
}
|
||
|
||
private static void a(com.ccnode.codegenerator.G.d.a.a a2, g g2, Profile profile) {
|
||
String string = g2.g();
|
||
for (com.ccnode.codegenerator.G.d.a.c c2 : a2.a()) {
|
||
k_0 k_02 = x_0.a.a(c2.b(), c2.a(), g2.com_ccnode_codegenerator_q_e_0_a(), profile, false, string);
|
||
List<String> list = k_02.a();
|
||
for (String string2 : list) {
|
||
a2.a().add(string2);
|
||
}
|
||
}
|
||
}
|
||
|
||
private static a a(com.ccnode.codegenerator.G.d.d.d d2, g g2) {
|
||
a a2 = d.a(g2);
|
||
a2.a(c.var_com_ccnode_codegenerator_G_a_c_a);
|
||
a2.a(d2);
|
||
return a2;
|
||
}
|
||
|
||
private static a a(com.ccnode.codegenerator.G.d.e.d d2, g g2) {
|
||
a a2 = d.a(g2);
|
||
a2.a(c.b);
|
||
a2.a(d2);
|
||
return a2;
|
||
}
|
||
|
||
private static a a(com.ccnode.codegenerator.G.d.c.a a2, g g2) {
|
||
a a3 = d.a(g2);
|
||
a3.a(c.c);
|
||
a3.a(a2);
|
||
return a3;
|
||
}
|
||
|
||
private static a a(com.ccnode.codegenerator.G.d.b.a a2, g g2) {
|
||
a a3 = d.a(g2);
|
||
a3.a(c.d);
|
||
a3.a(a2);
|
||
return a3;
|
||
}
|
||
|
||
private static a a(g g2) {
|
||
a a2 = new a();
|
||
a2.b(g2.e());
|
||
a2.a(g2.com_ccnode_codegenerator_q_e_0_a());
|
||
a2.c(g2.d());
|
||
a2.a(g2.a());
|
||
a2.d(g2.java_lang_String_c());
|
||
a2.a(g2.java_lang_String_b());
|
||
a2.a(g2.com_intellij_psi_PsiClass_a());
|
||
a2.a(g2.com_intellij_openapi_project_Project_a());
|
||
a2.a(g2.com_intellij_psi_xml_XmlFile_a());
|
||
a2.e(g2.f());
|
||
a2.f(g2.g());
|
||
a2.a(g2.boolean_a());
|
||
a2.g(g2.java_lang_String_a());
|
||
return a2;
|
||
}
|
||
|
||
private static String a(b b2) {
|
||
if (StringUtils.isEmpty((String)b2.java_lang_String_a())) {
|
||
return "the query not end legal";
|
||
}
|
||
return "the remaining " + b2.java_lang_String_a() + " can't be parsed";
|
||
}
|
||
|
||
public static b_0 b(List<com.ccnode.codegenerator.G.d.e.d> list, List<f> list2, g g2) {
|
||
Object object;
|
||
b_0 b_02 = new b_0();
|
||
if (list.size() == 0) {
|
||
b_02.b(false);
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
for (f f2 : list2) {
|
||
arrayList.add(d.a(f2));
|
||
}
|
||
b_02.a(arrayList);
|
||
return b_02;
|
||
}
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
com.ccnode.codegenerator.G.d.e.d d2 = null;
|
||
if (list.size() > 1) {
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
arrayList.add(list.get(i2).java_lang_String_a());
|
||
}
|
||
object = new com.ccnode.codegenerator.n.c(g2.com_intellij_openapi_project_Project_a(), arrayList);
|
||
boolean bl = object.showAndGet();
|
||
if (!bl) {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
return b_02;
|
||
}
|
||
d2 = list.get(((com.ccnode.codegenerator.n.c)((Object)object)).a());
|
||
} else {
|
||
d2 = list.get(0);
|
||
}
|
||
d.a((com.ccnode.codegenerator.G.d.a.a)d2, g2);
|
||
object = g2.g();
|
||
e e2 = com.ccnode.codegenerator.l.b.a(object).com_ccnode_codegenerator_l_a_f_a().a(d.a(d2, g2));
|
||
if (e2 != null) {
|
||
b_02.a(e2);
|
||
b_02.b(true);
|
||
} else {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
}
|
||
return b_02;
|
||
}
|
||
|
||
public static b_0 c(List<com.ccnode.codegenerator.G.d.c.a> list, List<com.ccnode.codegenerator.G.d.c.c> list2, g g2) {
|
||
Object object;
|
||
b_0 b_02 = new b_0();
|
||
if (list.size() == 0) {
|
||
b_02.b(false);
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
for (com.ccnode.codegenerator.G.d.c.c c2 : list2) {
|
||
arrayList.add(d.a(c2));
|
||
}
|
||
b_02.a(arrayList);
|
||
return b_02;
|
||
}
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
com.ccnode.codegenerator.G.d.c.a a2 = null;
|
||
if (list.size() > 1) {
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
arrayList.add(list.get(i2).java_lang_String_a());
|
||
}
|
||
object = new com.ccnode.codegenerator.n.c(g2.com_intellij_openapi_project_Project_a(), arrayList);
|
||
boolean bl = object.showAndGet();
|
||
if (!bl) {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
return b_02;
|
||
}
|
||
a2 = list.get(((com.ccnode.codegenerator.n.c)((Object)object)).a());
|
||
} else {
|
||
a2 = list.get(0);
|
||
}
|
||
d.a((com.ccnode.codegenerator.G.d.a.a)a2, g2);
|
||
object = g2.g();
|
||
e e2 = com.ccnode.codegenerator.l.b.a(object).com_ccnode_codegenerator_l_a_f_a().a(d.a(a2, g2));
|
||
if (e2 != null) {
|
||
b_02.a(e2);
|
||
b_02.b(true);
|
||
} else {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
}
|
||
return b_02;
|
||
}
|
||
|
||
public static b_0 d(List<com.ccnode.codegenerator.G.d.b.a> list, List<com.ccnode.codegenerator.G.d.b.c> list2, g g2) {
|
||
Object object;
|
||
b_0 b_02 = new b_0();
|
||
if (list.size() == 0) {
|
||
b_02.b(false);
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
for (com.ccnode.codegenerator.G.d.b.c c2 : list2) {
|
||
arrayList.add(d.a(c2));
|
||
}
|
||
b_02.a(arrayList);
|
||
return b_02;
|
||
}
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
com.ccnode.codegenerator.G.d.b.a a2 = null;
|
||
if (list.size() > 1) {
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
arrayList.add(list.get(i2).java_lang_String_a());
|
||
}
|
||
object = new com.ccnode.codegenerator.n.c(g2.com_intellij_openapi_project_Project_a(), arrayList);
|
||
boolean bl = object.showAndGet();
|
||
if (!bl) {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
return b_02;
|
||
}
|
||
a2 = list.get(((com.ccnode.codegenerator.n.c)((Object)object)).a());
|
||
} else {
|
||
a2 = list.get(0);
|
||
}
|
||
d.a((com.ccnode.codegenerator.G.d.a.a)a2, g2);
|
||
object = g2.g();
|
||
e e2 = com.ccnode.codegenerator.l.b.a(object).com_ccnode_codegenerator_l_a_f_a().a(d.a(a2, g2));
|
||
if (e2 != null) {
|
||
b_02.a(e2);
|
||
b_02.b(true);
|
||
} else {
|
||
b_02.b(false);
|
||
b_02.a(false);
|
||
}
|
||
return b_02;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.a;
|
||
|
||
import com.ccnode.codegenerator.G.a.b;
|
||
import com.ccnode.codegenerator.G.a.f;
|
||
import com.ccnode.codegenerator.G.d.a.a;
|
||
import com.ccnode.codegenerator.k.g;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
|
||
public class e {
|
||
private String var_java_lang_String_a;
|
||
private List<b> var_java_util_List_com_ccnode_codegenerator_G_a_b__a;
|
||
private String b;
|
||
private String c;
|
||
private String d;
|
||
private String e;
|
||
private g var_com_ccnode_codegenerator_k_g_a;
|
||
private Set<String> var_java_util_Set_java_lang_String__a;
|
||
private a var_com_ccnode_codegenerator_G_d_a_a_a;
|
||
private String f;
|
||
private f var_com_ccnode_codegenerator_G_a_f_a;
|
||
|
||
public a com_ccnode_codegenerator_G_d_a_a_a() {
|
||
return this.var_com_ccnode_codegenerator_G_d_a_a_a;
|
||
}
|
||
|
||
public void a(a a2) {
|
||
this.var_com_ccnode_codegenerator_G_d_a_a_a = a2;
|
||
}
|
||
|
||
public Set<String> a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(Set<String> set) {
|
||
this.var_java_lang_String_a = set;
|
||
}
|
||
|
||
public g com_ccnode_codegenerator_k_g_a() {
|
||
return this.var_com_ccnode_codegenerator_k_g_a;
|
||
}
|
||
|
||
public void a(g g2) {
|
||
this.var_com_ccnode_codegenerator_k_g_a = g2;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public List<b> a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(List<b> list) {
|
||
this.var_java_lang_String_a = list;
|
||
}
|
||
|
||
public String c() {
|
||
return this.c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.c = string;
|
||
}
|
||
|
||
public String d() {
|
||
return this.d;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.d = string;
|
||
}
|
||
|
||
public String e() {
|
||
return this.e;
|
||
}
|
||
|
||
public void e(String string) {
|
||
this.e = string;
|
||
}
|
||
|
||
public void a(b b2) {
|
||
if (this.var_java_lang_String_a == null) {
|
||
this.var_java_lang_String_a = new ArrayList();
|
||
}
|
||
this.var_java_lang_String_a.add(b2);
|
||
}
|
||
|
||
public f com_ccnode_codegenerator_G_a_f_a() {
|
||
return this.var_com_ccnode_codegenerator_G_a_f_a;
|
||
}
|
||
|
||
public void a(f f2) {
|
||
this.var_com_ccnode_codegenerator_G_a_f_a = f2;
|
||
}
|
||
|
||
public String f() {
|
||
return this.f;
|
||
}
|
||
|
||
public void f(String string) {
|
||
this.f = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.a;
|
||
|
||
public class f {
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.G.b;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.c;
|
||
import com.ccnode.codegenerator.Q.g;
|
||
import com.ccnode.codegenerator.ad.k_0;
|
||
import com.ccnode.codegenerator.ad.x_0;
|
||
import com.ccnode.codegenerator.ag.e.b;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.ArrayList;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private com.ccnode.codegenerator.G.d.a.a var_com_ccnode_codegenerator_G_d_a_a_a = Lists.newArrayList();
|
||
private g var_com_ccnode_codegenerator_Q_g_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
|
||
public a(g g2, com.ccnode.codegenerator.G.d.a.a a2) {
|
||
super(g2.com_intellij_openapi_project_Project_a(), true);
|
||
this.var_com_ccnode_codegenerator_Q_g_a = g2;
|
||
this.var_com_intellij_openapi_project_Project_a = this.var_com_ccnode_codegenerator_Q_g_a.com_intellij_openapi_project_Project_a();
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
this.var_com_ccnode_codegenerator_G_d_a_a_a = a2;
|
||
String string = b.a(g2.com_intellij_openapi_project_Project_a());
|
||
for (c c2 : this.var_com_ccnode_codegenerator_G_d_a_a_a.a()) {
|
||
k_0 k_02 = x_0.a.a(c2.b(), c2.a(), this.var_com_ccnode_codegenerator_Q_g_a.com_ccnode_codegenerator_q_e_0_a(), this.var_com_ccnode_codegenerator_myconfigurable_Profile_a, false, string);
|
||
List<String> list = k_02.a();
|
||
this.var_com_ccnode_codegenerator_G_d_a_a_a.addAll(list);
|
||
}
|
||
this.setTitle("add if test to queryRules");
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
gridBagConstraints.fill = 2;
|
||
gridBagConstraints.anchor = 17;
|
||
gridBagConstraints.gridx = 0;
|
||
gridBagConstraints.gridy = 0;
|
||
JCheckBox jCheckBox = new JCheckBox("Select All");
|
||
jPanel.add((Component)jCheckBox, gridBagConstraints);
|
||
++gridBagConstraints.gridy;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
Iterator iterator = this.var_com_ccnode_codegenerator_G_d_a_a_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
JCheckBox jCheckBox2 = new JCheckBox();
|
||
gridBagConstraints.gridx = 0;
|
||
jCheckBox2.addActionListener(actionEvent -> {
|
||
if (jCheckBox2.isSelected()) {
|
||
this.var_com_ccnode_codegenerator_G_d_a_a_a.a().add(string);
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_G_d_a_a_a.a().remove(string);
|
||
}
|
||
});
|
||
arrayList.add(jCheckBox2);
|
||
jPanel.add((Component)jCheckBox2, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JLabel jLabel = new JLabel(string);
|
||
jPanel.add((Component)jLabel, gridBagConstraints);
|
||
++gridBagConstraints.gridy;
|
||
}
|
||
jCheckBox.addActionListener(new ActionListener(){
|
||
final /* synthetic */ JCheckBox var_javax_swing_JCheckBox_a;
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_G_b_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_G_b_a_a = a2;
|
||
this.var_javax_swing_JCheckBox_a = jCheckBox;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (this.var_javax_swing_JCheckBox_a.isSelected()) {
|
||
for (JCheckBox jCheckBox : this.var_java_util_List_a) {
|
||
if (jCheckBox.isSelected()) continue;
|
||
jCheckBox.doClick();
|
||
}
|
||
} else {
|
||
for (JCheckBox jCheckBox : this.var_java_util_List_a) {
|
||
if (!jCheckBox.isSelected()) continue;
|
||
jCheckBox.doClick();
|
||
}
|
||
}
|
||
}
|
||
});
|
||
return jPanel;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.g;
|
||
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.G.a
|
||
*/
|
||
public class a_0 {
|
||
public static final String var_java_lang_String_a = "first";
|
||
public static final String b = "distinct";
|
||
public static final String c = "groupby";
|
||
public static final String d = "having";
|
||
public static final String e = "withpage";
|
||
public static final String f = "max";
|
||
public static final String g = "min";
|
||
public static final String h = "avg";
|
||
public static final String i = "sum";
|
||
public static final String j = "startingwith";
|
||
public static final String k = "endingwith";
|
||
public static final String l = "containing";
|
||
public static final String m = "one";
|
||
public static final String n = "before";
|
||
public static final String o = "after";
|
||
public static final String p = "count";
|
||
public static final String q = "by";
|
||
public static final String r = "delete";
|
||
public static final String s = "update";
|
||
public static final String t = "and";
|
||
public static final String u = "or";
|
||
public static final String v = "between";
|
||
public static final String w = "betweenorequalto";
|
||
public static final String x = "betweenequal";
|
||
public static final String y = "lessthan";
|
||
public static final String z = "lessthanorequalto";
|
||
public static final String A = "lessthanequal";
|
||
public static final String B = "greaterthan";
|
||
public static final String C = "greaterthanorequalto";
|
||
public static final String D = "greaterthanequal";
|
||
public static final String E = "true";
|
||
public static final String F = "false";
|
||
public static final String G = "isnull";
|
||
public static final String H = "null";
|
||
public static final String I = "isnotnull";
|
||
public static final String J = "notnull";
|
||
public static final String K = "like";
|
||
public static final String L = "notlike";
|
||
public static final String M = "orderby";
|
||
public static final String N = "asc";
|
||
public static final String O = "desc";
|
||
public static final String P = "not";
|
||
public static final String Q = "in";
|
||
public static final String R = "notin";
|
||
public static final String S = "except";
|
||
public static Map<String, String> var_java_util_Map_java_lang_String,_java_lang_String__a;
|
||
public static final String T = "inc";
|
||
public static final String U = "dec";
|
||
public static final String V = "insert";
|
||
public static final String W = "all";
|
||
|
||
static {
|
||
var_java_lang_String_a = new HashMap<String, String>(){
|
||
{
|
||
this.put(a_0.v, a_0.v);
|
||
this.put(a_0.B, "greaterThan");
|
||
this.put(a_0.C, "greaterThanOrEqualTo");
|
||
this.put(a_0.z, "lessThanOrEqualTo");
|
||
this.put(a_0.A, "lessThanEqual");
|
||
this.put(a_0.D, "greaterThanEqual");
|
||
this.put(a_0.y, "lessThan");
|
||
this.put(a_0.w, "betweenOrEqualTo");
|
||
this.put(a_0.x, "betweenEqual");
|
||
this.put(a_0.I, "isNotNull");
|
||
this.put(a_0.G, "isNull");
|
||
this.put(a_0.H, a_0.H);
|
||
this.put(a_0.J, "notNull");
|
||
this.put(a_0.L, "notLike");
|
||
this.put(a_0.K, a_0.K);
|
||
this.put(a_0.R, "notIn");
|
||
this.put(a_0.P, a_0.P);
|
||
this.put(a_0.Q, a_0.Q);
|
||
this.put(a_0.j, "startingWith");
|
||
this.put(a_0.k, "endingWith");
|
||
this.put(a_0.n, a_0.n);
|
||
this.put(a_0.o, a_0.o);
|
||
this.put(a_0.l, a_0.l);
|
||
this.put(a_0.E, a_0.E);
|
||
this.put(a_0.F, a_0.F);
|
||
}
|
||
};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Sets
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.a;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.c;
|
||
import com.ccnode.codegenerator.n.x;
|
||
import com.google.common.collect.Sets;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
|
||
public class a {
|
||
protected List<c> var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a = Sets.newHashSet();
|
||
private Set<String> var_java_util_Set_java_lang_String__a;
|
||
private boolean var_boolean_a = false;
|
||
protected String var_java_lang_String_a;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public void a(x x2, String string) {
|
||
this.var_java_lang_String_a = this.var_java_lang_String_a == null ? "| parsedType:" + x2.name() + " parse value:" + string : this.var_java_lang_String_a + "| parsedType:" + x2.name() + " parse value:" + string;
|
||
}
|
||
|
||
public void b(String string) {
|
||
if (this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a == null) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a = new ArrayList<c>();
|
||
}
|
||
c c2 = new c();
|
||
c2.a(string);
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a.add(c2);
|
||
}
|
||
|
||
public void c(String string) {
|
||
c c2 = this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a.get(this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a.size() - 1);
|
||
c2.b(string);
|
||
}
|
||
|
||
public void d(String string) {
|
||
c c2 = this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a.get(this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a.size() - 1);
|
||
c2.c(string);
|
||
}
|
||
|
||
public List<c> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public void a(List<c> list) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a = list;
|
||
}
|
||
|
||
public Set<String> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a;
|
||
}
|
||
|
||
public void a(Set<String> set) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_a_c__a = set;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.a;
|
||
|
||
public class b {
|
||
protected Integer var_java_lang_Integer_a;
|
||
protected String var_java_lang_String_a;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public Integer java_lang_Integer_a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public void a(Integer n2) {
|
||
this.var_java_lang_Integer_a = n2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.a;
|
||
|
||
public class c {
|
||
private String a;
|
||
private String b;
|
||
private String c;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String c() {
|
||
return this.c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.c = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.rits.cloning.Cloner
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.b;
|
||
|
||
import com.rits.cloning.Cloner;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class a
|
||
extends com.ccnode.codegenerator.G.d.a.a {
|
||
private boolean a = false;
|
||
private List<String> b;
|
||
|
||
public void e(String string) {
|
||
if (this.b == null) {
|
||
this.b = new ArrayList<String>();
|
||
}
|
||
this.b.add(string);
|
||
}
|
||
|
||
public List<String> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(List<String> list) {
|
||
this.b = list;
|
||
}
|
||
|
||
public a com_ccnode_codegenerator_G_d_b_a_a() {
|
||
return (a)Cloner.standard().deepClone((Object)this);
|
||
}
|
||
|
||
public boolean b() {
|
||
return this.a;
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.a = bl;
|
||
}
|
||
|
||
public /* synthetic */ Object clone() throws CloneNotSupportedException {
|
||
return this.com_ccnode_codegenerator_G_d_b_a_a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.b;
|
||
|
||
import com.ccnode.codegenerator.G.d.b.a;
|
||
import com.ccnode.codegenerator.G.d.b.c;
|
||
import java.util.List;
|
||
|
||
public class b {
|
||
private List<a> a;
|
||
private List<c> b;
|
||
|
||
public List<a> a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(List<a> list) {
|
||
this.a = list;
|
||
}
|
||
|
||
public List<c> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(List<c> list) {
|
||
this.b = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.b;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.b;
|
||
import com.ccnode.codegenerator.G.d.b.a;
|
||
|
||
public class c
|
||
extends b {
|
||
private a a;
|
||
|
||
public a com_ccnode_codegenerator_G_d_b_a_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(a a2) {
|
||
this.a = a2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.rits.cloning.Cloner
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.c;
|
||
|
||
import com.rits.cloning.Cloner;
|
||
|
||
public class a
|
||
extends com.ccnode.codegenerator.G.d.a.a {
|
||
public a com_ccnode_codegenerator_G_d_c_a_a() {
|
||
return (a)Cloner.standard().deepClone((Object)this);
|
||
}
|
||
|
||
public /* synthetic */ Object clone() throws CloneNotSupportedException {
|
||
return this.com_ccnode_codegenerator_G_d_c_a_a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.c;
|
||
|
||
import com.ccnode.codegenerator.G.d.c.a;
|
||
import com.ccnode.codegenerator.G.d.c.c;
|
||
import java.util.List;
|
||
|
||
public class b {
|
||
private List<a> a;
|
||
private List<c> b;
|
||
|
||
public List<a> a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(List<a> list) {
|
||
this.a = list;
|
||
}
|
||
|
||
public List<c> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(List<c> list) {
|
||
this.b = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.c;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.b;
|
||
import com.ccnode.codegenerator.G.d.c.a;
|
||
|
||
public class c
|
||
extends b {
|
||
private a a;
|
||
|
||
public a com_ccnode_codegenerator_G_d_c_a_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(a a2) {
|
||
this.a = a2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.d;
|
||
|
||
public class a {
|
||
private String a;
|
||
private String b;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.d;
|
||
|
||
public class b {
|
||
private String a;
|
||
private String b;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.d;
|
||
|
||
public class c {
|
||
private String a;
|
||
private String b = "asc";
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.rits.cloning.Cloner
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.d;
|
||
|
||
import com.ccnode.codegenerator.G.d.d.a;
|
||
import com.ccnode.codegenerator.G.d.d.b;
|
||
import com.ccnode.codegenerator.G.d.d.c;
|
||
import com.rits.cloning.Cloner;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class d
|
||
extends com.ccnode.codegenerator.G.d.a.a {
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c;
|
||
private Boolean var_java_lang_Boolean_a = false;
|
||
private Boolean var_java_lang_Boolean_b = false;
|
||
private Boolean var_java_lang_Boolean_c = true;
|
||
private Boolean var_java_lang_Boolean_d = false;
|
||
private List<b> var_java_util_List_com_ccnode_codegenerator_G_d_d_b__d;
|
||
private String var_java_lang_String_b;
|
||
private boolean var_boolean_a = false;
|
||
private Integer var_java_lang_Integer_a = -1;
|
||
List<c> var_java_util_List_com_ccnode_codegenerator_G_d_d_c__b;
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_b;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_b = bl;
|
||
}
|
||
|
||
public d com_ccnode_codegenerator_G_d_d_d_a() {
|
||
return (d)Cloner.standard().deepClone((Object)this);
|
||
}
|
||
|
||
public void e(String string) {
|
||
if (this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c == null) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c = new ArrayList<a>();
|
||
}
|
||
a a2 = new a();
|
||
a2.b(string);
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c.add(a2);
|
||
}
|
||
|
||
public void f(String string) {
|
||
if (this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c == null) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c = new ArrayList<a>();
|
||
}
|
||
a a2 = new a();
|
||
a2.a(string);
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c.add(a2);
|
||
}
|
||
|
||
public void g(String string) {
|
||
if (this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c == null) {
|
||
throw new RuntimeException("add function prop, the fetchProp shall not be empty");
|
||
}
|
||
a a2 = this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c.get(this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c.size() - 1);
|
||
a2.b(string);
|
||
}
|
||
|
||
public void h(String string) {
|
||
if (this.var_java_lang_Boolean_b == null) {
|
||
this.var_java_lang_Boolean_b = new ArrayList();
|
||
}
|
||
c c2 = new c();
|
||
c2.a(string);
|
||
this.var_java_lang_Boolean_b.add(c2);
|
||
}
|
||
|
||
public void i(String string) {
|
||
c c2 = (c)this.var_java_lang_Boolean_b.get(this.var_java_lang_Boolean_b.size() - 1);
|
||
c2.b(string);
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_b() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void b(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public Integer java_lang_Integer_a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public void a(Integer n2) {
|
||
this.var_java_lang_Integer_a = n2;
|
||
}
|
||
|
||
public List<a> b() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_G_d_d_a__c;
|
||
}
|
||
|
||
public List<c> c() {
|
||
return this.var_java_lang_Boolean_b;
|
||
}
|
||
|
||
public List<b> d() {
|
||
return this.var_java_lang_Boolean_d;
|
||
}
|
||
|
||
public Boolean c() {
|
||
return this.var_java_lang_Boolean_c;
|
||
}
|
||
|
||
public void c(Boolean bl) {
|
||
this.var_java_lang_Boolean_c = bl;
|
||
}
|
||
|
||
public Boolean d() {
|
||
return this.var_java_lang_Boolean_d;
|
||
}
|
||
|
||
public void d(Boolean bl) {
|
||
this.var_java_lang_Boolean_d = bl;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void j(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public boolean boolean_b() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public /* synthetic */ Object clone() throws CloneNotSupportedException {
|
||
return this.com_ccnode_codegenerator_G_d_d_d_a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.d;
|
||
|
||
import com.ccnode.codegenerator.G.d.d.d;
|
||
import com.ccnode.codegenerator.G.d.d.f;
|
||
import java.util.List;
|
||
|
||
public class e {
|
||
private List<d> a;
|
||
private List<f> b;
|
||
|
||
public List<d> a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(List<d> list) {
|
||
this.a = list;
|
||
}
|
||
|
||
public List<f> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(List<f> list) {
|
||
this.b = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.d;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.b;
|
||
import com.ccnode.codegenerator.G.d.d.d;
|
||
|
||
public class f
|
||
extends b {
|
||
private d a;
|
||
|
||
public d com_ccnode_codegenerator_G_d_d_d_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(d d2) {
|
||
this.a = d2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.e.c;
|
||
import com.ccnode.codegenerator.G.d.e.g;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import java.awt.Component;
|
||
import java.awt.GridBagConstraints;
|
||
import java.awt.GridBagLayout;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import javax.swing.event.DocumentEvent;
|
||
import javax.swing.event.DocumentListener;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private List<g> var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a = new HashMap();
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Map<String, c> var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_G_d_e_c__a;
|
||
|
||
public a(List<g> list, Project project) {
|
||
super(project, true);
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a = list;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new GridBagLayout());
|
||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||
for (g g2 : this.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a) {
|
||
++gridBagConstraints.gridy;
|
||
gridBagConstraints.gridx = 0;
|
||
JLabel jLabel = new JLabel(g2.a() + " value for " + g2.b());
|
||
jPanel.add((Component)jLabel, gridBagConstraints);
|
||
gridBagConstraints.gridx = 1;
|
||
JTextField jTextField = new JTextField(20);
|
||
jPanel.add((Component)jTextField, gridBagConstraints);
|
||
gridBagConstraints.gridx = 2;
|
||
JCheckBox jCheckBox = new JCheckBox("use param");
|
||
jPanel.add((Component)jCheckBox, gridBagConstraints);
|
||
jTextField.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ JTextField var_javax_swing_JTextField_a;
|
||
final /* synthetic */ JCheckBox var_javax_swing_JCheckBox_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_G_d_e_g_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_G_d_e_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_G_d_e_a_a = a2;
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
this.var_javax_swing_JCheckBox_a = jCheckBox;
|
||
this.var_com_ccnode_codegenerator_G_d_e_g_a = g2;
|
||
}
|
||
|
||
@Override
|
||
public void insertUpdate(DocumentEvent documentEvent) {
|
||
if (StringUtils.isNotBlank((String)this.var_javax_swing_JTextField_a.getText())) {
|
||
this.var_javax_swing_JCheckBox_a.setSelected(false);
|
||
c c2 = new c();
|
||
c2.a(false);
|
||
c2.a(this.var_javax_swing_JTextField_a.getText());
|
||
this.var_com_ccnode_codegenerator_G_d_e_a_a.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a.put(this.var_com_ccnode_codegenerator_G_d_e_g_a.b(), c2);
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public void removeUpdate(DocumentEvent documentEvent) {
|
||
if (StringUtils.isNotBlank((String)this.var_javax_swing_JTextField_a.getText())) {
|
||
this.var_javax_swing_JCheckBox_a.setSelected(false);
|
||
c c2 = new c();
|
||
c2.a(false);
|
||
c2.a(this.var_javax_swing_JTextField_a.getText());
|
||
this.var_com_ccnode_codegenerator_G_d_e_a_a.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a.put(this.var_com_ccnode_codegenerator_G_d_e_g_a.b(), c2);
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public void changedUpdate(DocumentEvent documentEvent) {
|
||
if (StringUtils.isNotBlank((String)this.var_javax_swing_JTextField_a.getText())) {
|
||
this.var_javax_swing_JCheckBox_a.setSelected(false);
|
||
c c2 = new c();
|
||
c2.a(false);
|
||
c2.a(this.var_javax_swing_JTextField_a.getText());
|
||
this.var_com_ccnode_codegenerator_G_d_e_a_a.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a.put(this.var_com_ccnode_codegenerator_G_d_e_g_a.b(), c2);
|
||
}
|
||
}
|
||
});
|
||
jCheckBox.addActionListener(new ActionListener(){
|
||
final /* synthetic */ JCheckBox var_javax_swing_JCheckBox_a;
|
||
final /* synthetic */ JTextField var_javax_swing_JTextField_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_G_d_e_g_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_G_d_e_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_G_d_e_a_a = a2;
|
||
this.var_javax_swing_JCheckBox_a = jCheckBox;
|
||
this.var_javax_swing_JTextField_a = jTextField;
|
||
this.var_com_ccnode_codegenerator_G_d_e_g_a = g2;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (this.var_javax_swing_JCheckBox_a.isSelected()) {
|
||
this.var_javax_swing_JTextField_a.setText("");
|
||
c c2 = new c();
|
||
c2.a(true);
|
||
this.var_com_ccnode_codegenerator_G_d_e_a_a.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a.put(this.var_com_ccnode_codegenerator_G_d_e_g_a.b(), c2);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
return jPanel;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
for (g g2 : this.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a) {
|
||
if (this.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a.get(g2.b()) != null) continue;
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)("please add value for " + g2.b()), (String)"error");
|
||
return;
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
|
||
public Map<String, c> a() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a;
|
||
}
|
||
|
||
public void a(Map<String, c> map) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_G_d_e_g__a = map;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
public class b {
|
||
private String a;
|
||
private String b;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
public class c {
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private String var_java_lang_String_a;
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.rits.cloning.Cloner
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.a;
|
||
import com.ccnode.codegenerator.G.d.e.g;
|
||
import com.google.common.collect.Lists;
|
||
import com.rits.cloning.Cloner;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class d
|
||
extends a {
|
||
private List<g> b = Lists.newArrayList();
|
||
private boolean a = false;
|
||
|
||
public void e(String string) {
|
||
if (this.b == null) {
|
||
this.b = new ArrayList<g>();
|
||
}
|
||
if (this.b.size() == 0) {
|
||
g g2 = new g();
|
||
g2.b(string);
|
||
this.b.add(g2);
|
||
} else {
|
||
g g3 = this.b.get(this.b.size() - 1);
|
||
if (g3.b() == null) {
|
||
g3.b(string);
|
||
} else {
|
||
g g4 = new g();
|
||
g4.b(string);
|
||
this.b.add(g4);
|
||
}
|
||
}
|
||
}
|
||
|
||
public boolean b() {
|
||
return this.a;
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.a = bl;
|
||
}
|
||
|
||
public void f(String string) {
|
||
if (this.b == null) {
|
||
this.b = new ArrayList<g>();
|
||
}
|
||
g g2 = new g();
|
||
g2.a(string);
|
||
this.b.add(g2);
|
||
}
|
||
|
||
public d com_ccnode_codegenerator_G_d_e_d_a() {
|
||
return (d)Cloner.standard().deepClone((Object)this);
|
||
}
|
||
|
||
public List<g> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public /* synthetic */ Object clone() throws CloneNotSupportedException {
|
||
return this.com_ccnode_codegenerator_G_d_e_d_a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.e.d;
|
||
import com.ccnode.codegenerator.G.d.e.f;
|
||
import java.util.List;
|
||
|
||
public class e {
|
||
private List<d> a;
|
||
private List<f> b;
|
||
|
||
public List<d> a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(List<d> list) {
|
||
this.a = list;
|
||
}
|
||
|
||
public List<f> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(List<f> list) {
|
||
this.b = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.a.b;
|
||
import com.ccnode.codegenerator.G.d.e.d;
|
||
|
||
public class f
|
||
extends b {
|
||
private d a;
|
||
|
||
public d com_ccnode_codegenerator_G_d_e_d_a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(d d2) {
|
||
this.a = d2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.d.e;
|
||
|
||
public class g {
|
||
private String a;
|
||
private String b;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
*/
|
||
package com.ccnode.codegenerator.G.e;
|
||
|
||
import com.google.common.collect.Lists;
|
||
import java.util.List;
|
||
|
||
public class a {
|
||
protected String var_java_lang_String_a;
|
||
protected String[] var_java_lang_String_arr_a;
|
||
protected String[] b;
|
||
public static String[] c = new String[]{"and", "or"};
|
||
public static List<String> var_java_util_List_java_lang_String__a;
|
||
public static String[] d;
|
||
public static String[] e;
|
||
public static String[] f;
|
||
|
||
public a(String string, List<String> list) {
|
||
this.var_java_lang_String_a = string;
|
||
this.var_java_lang_String_arr_a = new String[list.size()];
|
||
this.b = new String[list.size()];
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
this.var_java_lang_String_arr_a[i2] = list.get(i2);
|
||
this.b[i2] = list.get(i2).toLowerCase();
|
||
}
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_a = Lists.newArrayList((Object[])new String[]{"between", "greaterthan", "greaterthanorequalto", "lessthanorequalto", "lessthanequal", "greaterthanequal", "lessthan", "betweenorequalto", "betweenequal", "isnotnull", "isnull", "null", "notnull", "notlike", "like", "notin", "not", "in", "startingwith", "endingwith", "before", "after", "containing", "true", "false"});
|
||
d = new String[]{"max", "min", "avg", "sum"};
|
||
e = new String[]{"asc", "desc"};
|
||
f = new String[]{"inc", "dec"};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.b.c;
|
||
import com.ccnode.codegenerator.G.e.a;
|
||
import com.ccnode.codegenerator.n.x;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class b
|
||
extends a {
|
||
private List<com.ccnode.codegenerator.G.d.b.a> b = new ArrayList<com.ccnode.codegenerator.G.d.b.a>();
|
||
private List<c> c = new ArrayList<c>();
|
||
|
||
public b(String string, List<String> list) {
|
||
super(string, list);
|
||
}
|
||
|
||
public com.ccnode.codegenerator.G.d.b.b a() {
|
||
int n2 = 0;
|
||
int n3 = "count".length();
|
||
com.ccnode.codegenerator.G.d.b.a a2 = new com.ccnode.codegenerator.G.d.b.a();
|
||
this.a(n2, this.a, n3, a2);
|
||
com.ccnode.codegenerator.G.d.b.b b2 = new com.ccnode.codegenerator.G.d.b.b();
|
||
b2.a(this.b);
|
||
b2.b(this.c);
|
||
return b2;
|
||
}
|
||
|
||
private void a(int n2, String string, int n3, com.ccnode.codegenerator.G.d.b.a a2) {
|
||
if (string.length() == n3) {
|
||
if (this.a(n2)) {
|
||
this.b.add(a2);
|
||
} else {
|
||
c c2 = new c();
|
||
c2.a(a2);
|
||
c2.a(n2);
|
||
c2.a("");
|
||
this.c.add(c2);
|
||
}
|
||
return;
|
||
}
|
||
String string2 = string.substring(n3);
|
||
boolean bl = false;
|
||
switch (n2) {
|
||
case 0: {
|
||
if (string2.startsWith("all")) {
|
||
com.ccnode.codegenerator.G.d.b.a a3 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
this.a(0, string2, "all".length(), a3);
|
||
bl = true;
|
||
}
|
||
for (int i2 = 0; i2 < this.a.length; ++i2) {
|
||
if (!string2.startsWith((String)((Object)this.b[i2]))) continue;
|
||
com.ccnode.codegenerator.G.d.b.a a4 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a4.e(this.a[i2]);
|
||
a4.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i2]);
|
||
this.a(1, string2, this.a[i2].length(), a4);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("distinct")) {
|
||
com.ccnode.codegenerator.G.d.b.a a5 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a5.b(true);
|
||
a5.a(x.b, "distinct");
|
||
this.a(2, string2, "distinct".length(), a5);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("by")) break;
|
||
com.ccnode.codegenerator.G.d.b.a a6 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a6.a(x.d, "by");
|
||
this.a(4, string2, "by".length(), a6);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 1: {
|
||
if (!string2.startsWith("by")) break;
|
||
com.ccnode.codegenerator.G.d.b.a a7 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a7.a(x.d, "by");
|
||
this.a(4, string2, "by".length(), a7);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 2: {
|
||
for (int i3 = 0; i3 < this.a.length; ++i3) {
|
||
if (!string2.startsWith((String)((Object)this.b[i3]))) continue;
|
||
com.ccnode.codegenerator.G.d.b.a a8 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a8.e(this.a[i3]);
|
||
a8.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i3]);
|
||
this.a(3, string2, this.a[i3].length(), a8);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 3: {
|
||
com.ccnode.codegenerator.G.d.b.a a9;
|
||
if (string2.startsWith("and")) {
|
||
a9 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a9.a(x.f, "and");
|
||
this.a(2, string2, "and".length(), a9);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("by")) break;
|
||
a9 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a9.a(x.d, "by");
|
||
this.a(4, string2, "by".length(), a9);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 4: {
|
||
for (int i4 = 0; i4 < this.a.length; ++i4) {
|
||
if (!string2.startsWith((String)((Object)this.b[i4]))) continue;
|
||
com.ccnode.codegenerator.G.d.b.a a10 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a10.b(this.a[i4]);
|
||
a10.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i4]);
|
||
this.a(5, string2, this.a[i4].length(), a10);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 5: {
|
||
for (List<c> list : c) {
|
||
if (!string2.startsWith((String)((Object)list))) continue;
|
||
com.ccnode.codegenerator.G.d.b.a a11 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a11.d((String)((Object)list));
|
||
a11.a(x.e, (String)((Object)list));
|
||
this.a(4, string2, ((String)((Object)list)).length(), a11);
|
||
bl = true;
|
||
}
|
||
for (String string3 : a) {
|
||
if (!string2.startsWith(string3)) continue;
|
||
com.ccnode.codegenerator.G.d.b.a a12 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a12.c(string3);
|
||
a12.a(x.h, string3);
|
||
this.a(6, string2, string3.length(), a12);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 6: {
|
||
for (List<c> list : c) {
|
||
if (!string2.startsWith((String)((Object)list))) continue;
|
||
com.ccnode.codegenerator.G.d.b.a a13 = a2.com_ccnode_codegenerator_G_d_b_a_a();
|
||
a13.d((String)((Object)list));
|
||
a13.a(x.e, (String)((Object)list));
|
||
this.a(4, string2, ((String)((Object)list)).length(), a13);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
if (!bl) {
|
||
c c3 = new c();
|
||
c3.a(a2);
|
||
c3.a(string2);
|
||
c3.a(n2);
|
||
this.c.add(c3);
|
||
}
|
||
}
|
||
|
||
private boolean a(int n2) {
|
||
return n2 == 0 || n2 == 1 || n2 == 3 || n2 == 5 || n2 == 6;
|
||
}
|
||
|
||
public static void a(String[] stringArray) {
|
||
String string = "count";
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
arrayList.add("id");
|
||
arrayList.add("name");
|
||
arrayList.add("username");
|
||
com.ccnode.codegenerator.G.d.b.b b2 = new b(string.toLowerCase(), arrayList).a();
|
||
b2.a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.c.b;
|
||
import com.ccnode.codegenerator.G.e.a;
|
||
import com.ccnode.codegenerator.k.e;
|
||
import com.ccnode.codegenerator.n.x;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class c
|
||
extends a {
|
||
private List<com.ccnode.codegenerator.G.d.c.a> b = new ArrayList<com.ccnode.codegenerator.G.d.c.a>();
|
||
private List<com.ccnode.codegenerator.G.d.c.c> c = new ArrayList<com.ccnode.codegenerator.G.d.c.c>();
|
||
|
||
public c(String string, List<String> list) {
|
||
super(string, list);
|
||
}
|
||
|
||
public b a() {
|
||
int n2 = 0;
|
||
int n3 = 0;
|
||
for (String object2 : com.ccnode.codegenerator.k.e.e) {
|
||
if (!this.a.startsWith(object2)) continue;
|
||
n3 = object2.length();
|
||
break;
|
||
}
|
||
com.ccnode.codegenerator.G.d.c.a a2 = new com.ccnode.codegenerator.G.d.c.a();
|
||
this.a(n2, this.a, n3, a2);
|
||
b b2 = new b();
|
||
b2.a(this.b);
|
||
b2.b(this.c);
|
||
return b2;
|
||
}
|
||
|
||
private void a(int n2, String string, int n3, com.ccnode.codegenerator.G.d.c.a a2) {
|
||
if (string.length() == n3) {
|
||
if (this.a(n2)) {
|
||
this.b.add(a2);
|
||
} else {
|
||
com.ccnode.codegenerator.G.d.c.c c2 = new com.ccnode.codegenerator.G.d.c.c();
|
||
c2.a(a2);
|
||
c2.a("");
|
||
c2.a(n2);
|
||
this.c.add(c2);
|
||
}
|
||
return;
|
||
}
|
||
String string2 = string.substring(n3);
|
||
boolean bl = false;
|
||
switch (n2) {
|
||
case 0: {
|
||
com.ccnode.codegenerator.G.d.c.a a3;
|
||
if (string2.startsWith("by")) {
|
||
a3 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
a3.a(x.d, "by");
|
||
this.a(1, string2, "by".length(), a3);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("all")) break;
|
||
a3 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
this.a(0, string2, "all".length(), a3);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 1: {
|
||
for (int i2 = 0; i2 < this.a.length; ++i2) {
|
||
if (!string2.startsWith((String)((Object)this.b[i2]))) continue;
|
||
com.ccnode.codegenerator.G.d.c.a a4 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
a4.b(this.a[i2]);
|
||
a4.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i2]);
|
||
this.a(2, string2, this.a[i2].length(), a4);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 2: {
|
||
for (List<com.ccnode.codegenerator.G.d.c.c> list : c) {
|
||
if (!string2.startsWith((String)((Object)list))) continue;
|
||
com.ccnode.codegenerator.G.d.c.a a5 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
a5.d((String)((Object)list));
|
||
a5.a(x.e, (String)((Object)list));
|
||
this.a(1, string2, ((String)((Object)list)).length(), a5);
|
||
bl = true;
|
||
}
|
||
for (String string3 : a) {
|
||
if (!string2.startsWith(string3)) continue;
|
||
com.ccnode.codegenerator.G.d.c.a a6 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
a6.c(string3);
|
||
a6.a(x.h, string3);
|
||
this.a(3, string2, string3.length(), a6);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 3: {
|
||
for (List<com.ccnode.codegenerator.G.d.c.c> list : c) {
|
||
if (!string2.startsWith((String)((Object)list))) continue;
|
||
com.ccnode.codegenerator.G.d.c.a a7 = a2.com_ccnode_codegenerator_G_d_c_a_a();
|
||
a7.d((String)((Object)list));
|
||
a7.a(x.e, (String)((Object)list));
|
||
this.a(1, string2, ((String)((Object)list)).length(), a7);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
if (!bl) {
|
||
com.ccnode.codegenerator.G.d.c.c c3 = new com.ccnode.codegenerator.G.d.c.c();
|
||
c3.a(a2);
|
||
c3.a(string2);
|
||
c3.a(n2);
|
||
this.c.add(c3);
|
||
}
|
||
}
|
||
|
||
private boolean a(int n2) {
|
||
return n2 == 0 || n2 == 2 || n2 == 3;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.gson.Gson
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.application.impl.ApplicationImpl
|
||
* com.intellij.openapi.ui.Messages
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.FileUtils
|
||
*/
|
||
package com.ccnode.codegenerator.G.e;
|
||
|
||
import com.ccnode.codegenerator.G.e.a;
|
||
import com.ccnode.codegenerator.af.d.f;
|
||
import com.ccnode.codegenerator.af.f.b;
|
||
import com.ccnode.codegenerator.af.f.c;
|
||
import com.ccnode.codegenerator.k.e;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.n.x;
|
||
import com.google.gson.Gson;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.application.impl.ApplicationImpl;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import java.io.File;
|
||
import java.util.ArrayList;
|
||
import java.util.Base64;
|
||
import java.util.Calendar;
|
||
import java.util.List;
|
||
import java.util.function.Predicate;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.FileUtils;
|
||
|
||
public class d
|
||
extends a {
|
||
private List<com.ccnode.codegenerator.G.d.d.d> b = new ArrayList<com.ccnode.codegenerator.G.d.d.d>();
|
||
private List<com.ccnode.codegenerator.G.d.d.f> c = new ArrayList<com.ccnode.codegenerator.G.d.d.f>();
|
||
|
||
public d(String string, List<String> list) {
|
||
super(string, list);
|
||
}
|
||
|
||
public com.ccnode.codegenerator.G.d.d.e com_ccnode_codegenerator_G_d_d_e_a() {
|
||
int n2 = 0;
|
||
int n3 = 0;
|
||
for (String object2 : com.ccnode.codegenerator.k.e.c) {
|
||
if (!this.a.startsWith(object2)) continue;
|
||
n3 = object2.length();
|
||
break;
|
||
}
|
||
com.ccnode.codegenerator.G.d.d.d d2 = new com.ccnode.codegenerator.G.d.d.d();
|
||
this.a(n2, this.a, n3, d2);
|
||
com.ccnode.codegenerator.G.d.d.e e2 = new com.ccnode.codegenerator.G.d.d.e();
|
||
e2.a(this.b);
|
||
e2.b(this.c);
|
||
return e2;
|
||
}
|
||
|
||
private void a(int n2, String string, int n3, com.ccnode.codegenerator.G.d.d.d d2) {
|
||
com.ccnode.codegenerator.G.e.d.void_a();
|
||
if (string.length() == n3) {
|
||
if (this.a(n2)) {
|
||
this.b.add(d2);
|
||
} else {
|
||
com.ccnode.codegenerator.G.d.d.f f2 = new com.ccnode.codegenerator.G.d.d.f();
|
||
f2.a(d2);
|
||
f2.a(n2);
|
||
f2.a("");
|
||
this.c.add(f2);
|
||
}
|
||
return;
|
||
}
|
||
String string2 = string.substring(n3);
|
||
boolean bl = false;
|
||
switch (n2) {
|
||
case 0: {
|
||
com.ccnode.codegenerator.G.d.d.d d3;
|
||
if (string2.startsWith("all")) {
|
||
d3 = this.a(d2);
|
||
this.a(0, string2, "all".length(), d3);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("distinct")) {
|
||
d3 = this.a(d2);
|
||
d3.b((Boolean)true);
|
||
d3.a(x.b, "distinct");
|
||
this.a(1, string2, "distinct".length(), d3);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("first")) {
|
||
if (string2.length() == "first".length()) {
|
||
d3 = this.a(d2);
|
||
d3.a(1);
|
||
d3.c(false);
|
||
d3.a(x.g, "first");
|
||
this.a(2, string2, "first".length(), d3);
|
||
bl = true;
|
||
} else {
|
||
char c2;
|
||
int n4;
|
||
int n5 = 0;
|
||
for (n4 = "first".length(); n4 < string2.length() && (c2 = string2.charAt(n4)) >= '0' && c2 <= '9'; ++n4) {
|
||
n5 = n5 * 10 + (c2 - 48);
|
||
}
|
||
com.ccnode.codegenerator.G.d.d.d d4 = this.a(d2);
|
||
if (n5 == 0) {
|
||
n5 = 1;
|
||
d4.c(false);
|
||
} else {
|
||
d4.c(true);
|
||
}
|
||
d4.a(n5);
|
||
d4.a(x.g, string2.substring(0, n4));
|
||
this.a(2, string2, n4, d4);
|
||
bl = true;
|
||
}
|
||
}
|
||
if (string2.startsWith("one")) {
|
||
com.ccnode.codegenerator.G.d.d.d d5 = this.a(d2);
|
||
d5.c(false);
|
||
d5.a(x.k, "one");
|
||
this.a(2, string2, "one".length(), d5);
|
||
bl = true;
|
||
}
|
||
for (int i2 = 0; i2 < this.a.length; ++i2) {
|
||
if (!string2.startsWith((String)((Object)this.b[i2]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d6 = this.a(d2);
|
||
d6.e(this.a[i2]);
|
||
d6.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i2]);
|
||
this.a(3, string2, this.a[i2].length(), d6);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("orderby")) {
|
||
com.ccnode.codegenerator.G.d.d.d d7 = this.a(d2);
|
||
d7.a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), d7);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("by")) {
|
||
com.ccnode.codegenerator.G.d.d.d d8 = this.a(d2);
|
||
d8.a(x.d, "by");
|
||
this.a(8, string2, "by".length(), d8);
|
||
bl = true;
|
||
}
|
||
for (String string3 : d) {
|
||
if (!string2.startsWith(string3)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d9 = this.a(d2);
|
||
d9.f(string3);
|
||
d9.a(x.i, string3);
|
||
this.a(11, string2, string3.length(), d9);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
com.ccnode.codegenerator.G.d.d.d d10 = this.a(d2);
|
||
d10.a(x.l, "withpage");
|
||
d10.a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), d10);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 1: {
|
||
for (int i3 = 0; i3 < this.a.length; ++i3) {
|
||
if (!string2.startsWith((String)((Object)this.b[i3]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d11 = this.a(d2);
|
||
d11.e(this.a[i3]);
|
||
d11.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i3]);
|
||
this.a(3, string2, this.a[i3].length(), d11);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 2: {
|
||
for (int i4 = 0; i4 < this.a.length; ++i4) {
|
||
if (!string2.startsWith((String)((Object)this.b[i4]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d12 = this.a(d2);
|
||
d12.e(this.a[i4]);
|
||
d12.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i4]);
|
||
this.a(3, string2, this.a[i4].length(), d12);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("orderby")) {
|
||
com.ccnode.codegenerator.G.d.d.d d13 = this.a(d2);
|
||
d13.a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), d13);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("by")) {
|
||
com.ccnode.codegenerator.G.d.d.d d14 = this.a(d2);
|
||
d14.a(x.d, "by");
|
||
this.a(8, string2, "by".length(), d14);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
com.ccnode.codegenerator.G.d.d.d d15 = this.a(d2);
|
||
d15.a(x.l, "withpage");
|
||
d15.a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), d15);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 3: {
|
||
com.ccnode.codegenerator.G.d.d.d d16;
|
||
if (string2.startsWith("and")) {
|
||
d16 = this.a(d2);
|
||
d16.a(x.f, "and");
|
||
this.a(7, string2, "and".length(), d16);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("by")) {
|
||
d16 = this.a(d2);
|
||
d16.a(x.d, "by");
|
||
this.a(8, string2, "by".length(), d16);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("orderby")) {
|
||
d16 = this.a(d2);
|
||
d16.a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), d16);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
d16 = this.a(d2);
|
||
d16.a(x.l, "withpage");
|
||
d16.a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), d16);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 4: {
|
||
for (int i5 = 0; i5 < this.a.length; ++i5) {
|
||
if (!string2.startsWith((String)((Object)this.b[i5]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d17 = this.a(d2);
|
||
d17.h(this.a[i5]);
|
||
d17.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i5]);
|
||
this.a(5, string2, this.a[i5].length(), d17);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 5: {
|
||
Object object;
|
||
for (String string4 : e) {
|
||
if (!string2.startsWith(string4)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d18 = this.a(d2);
|
||
d18.i(string4);
|
||
d18.a(x.j, string4);
|
||
this.a(6, string2, string4.length(), d18);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("and")) {
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.f, "and");
|
||
this.a(4, string2, "and".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.l, "withpage");
|
||
((com.ccnode.codegenerator.G.d.d.d)object).a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 6: {
|
||
com.ccnode.codegenerator.G.d.d.d d19;
|
||
if (string2.startsWith("and")) {
|
||
d19 = this.a(d2);
|
||
d19.a(x.f, "and");
|
||
this.a(4, string2, "and".length(), d19);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
d19 = this.a(d2);
|
||
d19.a(x.l, "withpage");
|
||
d19.a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), d19);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 7: {
|
||
for (int i6 = 0; i6 < this.a.length; ++i6) {
|
||
if (!string2.startsWith((String)((Object)this.b[i6]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d20 = this.a(d2);
|
||
d20.e(this.a[i6]);
|
||
d20.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i6]);
|
||
this.a(3, string2, this.a[i6].length(), d20);
|
||
bl = true;
|
||
}
|
||
for (String string5 : d) {
|
||
if (!string2.startsWith(string5)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d21 = this.a(d2);
|
||
d21.c(false);
|
||
d21.f(string5);
|
||
d21.a(x.i, string5);
|
||
this.a(11, string2, string5.length(), d21);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 8: {
|
||
for (int i7 = 0; i7 < this.a.length; ++i7) {
|
||
if (!string2.startsWith((String)((Object)this.b[i7]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d22 = this.a(d2);
|
||
d22.b(this.a[i7]);
|
||
d22.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i7]);
|
||
this.a(9, string2, this.a[i7].length(), d22);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("all")) break;
|
||
com.ccnode.codegenerator.G.d.d.d d23 = this.a(d2);
|
||
d23.d(true);
|
||
d23.a(true);
|
||
for (int i8 = 0; i8 < this.a.length; ++i8) {
|
||
d23.b(this.a[i8]);
|
||
if (i8 == this.a.length - 1) continue;
|
||
d23.d("and");
|
||
}
|
||
d23.a(x.n, "all");
|
||
this.a(12, string2, "all".length(), d23);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 9: {
|
||
Object object;
|
||
for (String string6 : a) {
|
||
if (!string2.startsWith(string6)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d24 = this.a(d2);
|
||
d24.a(x.h, string6);
|
||
d24.c(string6);
|
||
this.a(10, string2, string6.length(), d24);
|
||
bl = true;
|
||
}
|
||
for (Object object2 : c) {
|
||
if (!string2.startsWith((String)object2)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d25 = this.a(d2);
|
||
d25.d((String)object2);
|
||
d25.a(x.e, (String)object2);
|
||
this.a(8, string2, ((String)object2).length(), d25);
|
||
}
|
||
if (string2.startsWith("orderby")) {
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.l, "withpage");
|
||
((com.ccnode.codegenerator.G.d.d.d)object).a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 10: {
|
||
Object object;
|
||
if (string2.startsWith("orderby")) {
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
}
|
||
for (Object object3 : c) {
|
||
if (!string2.startsWith((String)object3)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d26 = this.a(d2);
|
||
d26.d((String)object3);
|
||
d26.a(x.e, (String)object3);
|
||
this.a(8, string2, ((String)object3).length(), d26);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("withpage")) break;
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.l, "withpage");
|
||
((com.ccnode.codegenerator.G.d.d.d)object).a((Boolean)true);
|
||
this.a(12, string2, "withpage".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 11: {
|
||
for (int i9 = 0; i9 < this.a.length; ++i9) {
|
||
if (!string2.startsWith((String)((Object)this.b[i9]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d27 = this.a(d2);
|
||
d27.g(this.a[i9]);
|
||
d27.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i9]);
|
||
this.a(3, string2, this.a[i9].length(), d27);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 12: {
|
||
com.ccnode.codegenerator.G.d.d.d d28;
|
||
if (string2.startsWith("except")) {
|
||
d28 = this.a(d2);
|
||
d28.a(x.p, "except");
|
||
this.a(13, string2, "except".length(), d28);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("orderby")) break;
|
||
d28 = this.a(d2);
|
||
d28.a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), d28);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 13: {
|
||
for (int i10 = 0; i10 < this.a.length; ++i10) {
|
||
if (!string2.startsWith((String)((Object)this.b[i10]))) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d29 = this.a(d2);
|
||
List<com.ccnode.codegenerator.G.d.a.c> list = d29.a();
|
||
String string7 = this.a[i10];
|
||
list.removeIf(new Predicate<com.ccnode.codegenerator.G.d.a.c>(){
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ d var_com_ccnode_codegenerator_G_e_d_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_G_e_d_a = d2;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public boolean a(com.ccnode.codegenerator.G.d.a.c c2) {
|
||
return c2.a().equals(this.var_java_lang_String_a);
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ boolean test(Object object) {
|
||
return this.a((com.ccnode.codegenerator.G.d.a.c)object);
|
||
}
|
||
});
|
||
d29.j(string7);
|
||
d29.a(x.var_com_ccnode_codegenerator_n_x_a, string7);
|
||
this.a(14, string2, string7.length(), d29);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 14: {
|
||
Object object;
|
||
if (string2.startsWith("and")) {
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.f, "and");
|
||
((com.ccnode.codegenerator.G.d.a.a)object).d("and");
|
||
this.a(13, string2, "and".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
}
|
||
for (String string8 : a) {
|
||
if (!string2.startsWith(string8)) continue;
|
||
com.ccnode.codegenerator.G.d.d.d d30 = this.a(d2);
|
||
d30.a(x.h, string8);
|
||
d30.d("and");
|
||
d30.b(d30.java_lang_String_b());
|
||
d30.c(string8);
|
||
d30.b(true);
|
||
this.a(15, string2, string8.length(), d30);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("orderby")) break;
|
||
object = this.a(d2);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), (com.ccnode.codegenerator.G.d.d.d)object);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 15: {
|
||
com.ccnode.codegenerator.G.d.d.d d31;
|
||
if (string2.startsWith("and")) {
|
||
d31 = this.a(d2);
|
||
d31.a(x.f, "and");
|
||
d31.d("and");
|
||
this.a(13, string2, "and".length(), d31);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("orderby")) break;
|
||
d31 = this.a(d2);
|
||
d31.a(x.c, "orderby");
|
||
this.a(4, string2, "orderby".length(), d31);
|
||
bl = true;
|
||
}
|
||
}
|
||
if (!bl) {
|
||
com.ccnode.codegenerator.G.d.d.f f3 = new com.ccnode.codegenerator.G.d.d.f();
|
||
f3.a(d2);
|
||
f3.a(string2);
|
||
f3.a(n2);
|
||
this.c.add(f3);
|
||
}
|
||
}
|
||
|
||
private static void void_a() {
|
||
Object object;
|
||
Calendar calendar = Calendar.getInstance();
|
||
calendar.add(12, -5);
|
||
boolean bl = true;
|
||
try {
|
||
object = new File(com.ccnode.codegenerator.af.b.a.java_lang_String_a("mybatisCodeHelperPro"));
|
||
String string = FileUtils.readFileToString((File)object, (String)"UTF-8");
|
||
byte[] byArray = null;
|
||
try {
|
||
byArray = com.ccnode.codegenerator.af.f.d.b(com.ccnode.codegenerator.af.f.d.java_security_interfaces_RSAPublicKey_a(new String(Base64.getDecoder().decode("TUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDZzUyUjExV0h1MysvNUV2WnhkS0l2a3ovekpnS2VNUUhNLytMVkxSZS9zWUpFQlUxbUUrODc3MmJJckk4UThscldqSHc5cmVjQ1RWVVhXUnhWYXBndk1HYTZ3KzU4STZwYXdSaFhwZDBrRkhUY2xxeUZGWFpoS3ZiQUtoblphRGNuZkJtSkhObTQwR0JFTGpCTmx5MXpha2FIblFmUzF0QlhaSGQwOUV0c2VRSURBUUFC"), Charsets.UTF_8)), Base64.getDecoder().decode(string));
|
||
}
|
||
catch (b b2) {
|
||
byArray = com.ccnode.codegenerator.af.f.d.b(new c(), Base64.getDecoder().decode(string));
|
||
}
|
||
f f2 = null;
|
||
f2 = (f)new Gson().fromJson(new String(byArray, "UTF-8"), f.class);
|
||
String string2 = f2.java_lang_String_a();
|
||
if (string2.equals("keyNotExist") || string2.equals("feimao") || string2.contains("<22><><CF><D0>") || string2.contains("<22><><BC><A4><BB><EE>")) {
|
||
bl = false;
|
||
} else {
|
||
if (f2.java_lang_Long_a() > calendar.getTime().getTime()) {
|
||
return;
|
||
}
|
||
bl = false;
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
bl = false;
|
||
}
|
||
object = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
((Profile)object).setIfUseNewMapping(((Profile)object).getIfUseNewMapping() + 1);
|
||
if (((Profile)object).getIfUseNewMapping() > Integer.valueOf("100")) {
|
||
((Profile)object).setIfUseNewMapping(Integer.valueOf("80"));
|
||
try {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
Messages.showErrorDialog((String)"<22><><C4><E3><D5><FD>ʹ<DA><CAB9><D3>ƽ<C6><C6BD><E2><B0><E6>MybatisCodeHelperPro<72><6F><B2><E5><BC><FE><A3><AC><BD><AB><BB><E1><C9>ɴ<B3><C9B4><ED><CE>Ĵ<B5><C4B4><FA><C2><EB><BA><CD><D4>ɵ<B3><C9B5>Կ<C4><D4BF><A8><C2>뵽 https://brucege.com/pay/view <20><><B9><BA><C2><F2><D5><FD>", (String)"MybatisCodeHelperPro<72><6F><B2><E5><BC><FE><B7><C7><D5><FD>");
|
||
com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().setValid(false);
|
||
ApplicationImpl applicationImpl = (ApplicationImpl)ApplicationManager.getApplication();
|
||
applicationImpl.exit(true, true);
|
||
}
|
||
});
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
}
|
||
}
|
||
|
||
private com.ccnode.codegenerator.G.d.d.d a(com.ccnode.codegenerator.G.d.d.d d2) {
|
||
return d2.com_ccnode_codegenerator_G_d_d_d_a();
|
||
}
|
||
|
||
private boolean a(int n2) {
|
||
return n2 == 0 || n2 == 2 || n2 == 3 || n2 == 5 || n2 == 6 || n2 == 9 || n2 == 10 || n2 == 12 || n2 == 14 || n2 == 15;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.e.a;
|
||
|
||
public interface a {
|
||
public boolean a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.G.e;
|
||
|
||
import com.ccnode.codegenerator.G.d.e.d;
|
||
import com.ccnode.codegenerator.G.d.e.f;
|
||
import com.ccnode.codegenerator.G.e.a;
|
||
import com.ccnode.codegenerator.n.x;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class e
|
||
extends a {
|
||
private List<d> b = new ArrayList<d>();
|
||
private List<f> c = new ArrayList<f>();
|
||
|
||
public e(String string, List<String> list) {
|
||
super(string, list);
|
||
}
|
||
|
||
public com.ccnode.codegenerator.G.d.e.e a() {
|
||
int n2 = 0;
|
||
int n3 = 0;
|
||
for (String object2 : com.ccnode.codegenerator.k.e.d) {
|
||
if (!this.a.startsWith(object2)) continue;
|
||
n3 = object2.length();
|
||
break;
|
||
}
|
||
d d2 = new d();
|
||
this.a(n2, this.a, n3, d2);
|
||
com.ccnode.codegenerator.G.d.e.e e2 = new com.ccnode.codegenerator.G.d.e.e();
|
||
e2.a(this.b);
|
||
e2.b(this.c);
|
||
return e2;
|
||
}
|
||
|
||
private void a(int n2, String string, int n3, d d2) {
|
||
if (string.length() == n3) {
|
||
if (this.a(n2)) {
|
||
this.b.add(d2);
|
||
} else {
|
||
f f2 = new f();
|
||
f2.a(d2);
|
||
f2.a(n2);
|
||
f2.a("");
|
||
this.c.add(f2);
|
||
}
|
||
return;
|
||
}
|
||
String string2 = string.substring(n3);
|
||
boolean bl = false;
|
||
switch (n2) {
|
||
case 0: {
|
||
Object object;
|
||
for (int i2 = 0; i2 < this.a.length; ++i2) {
|
||
if (!string2.startsWith((String)((Object)this.b[i2]))) continue;
|
||
d d3 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d3.e(this.a[i2]);
|
||
d3.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i2]);
|
||
this.a(1, string2, this.a[i2].length(), d3);
|
||
bl = true;
|
||
}
|
||
for (String string3 : f) {
|
||
if (!string2.startsWith(string3)) continue;
|
||
d d4 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d4.f(string3);
|
||
d4.a(x.m, string3);
|
||
this.a(5, string2, string3.length(), d4);
|
||
bl = true;
|
||
}
|
||
if (string2.startsWith("all")) {
|
||
object = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
this.a(0, string2, "all".length(), (d)object);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("by")) break;
|
||
object = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
((d)object).b(true);
|
||
((com.ccnode.codegenerator.G.d.a.a)object).a(x.d, "by");
|
||
this.a(2, string2, "by".length(), (d)object);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 5: {
|
||
for (int i3 = 0; i3 < this.a.length; ++i3) {
|
||
if (!string2.startsWith((String)((Object)this.b[i3]))) continue;
|
||
d d5 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d5.e(this.a[i3]);
|
||
d5.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i3]);
|
||
this.a(1, string2, this.a[i3].length(), d5);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 1: {
|
||
d d6;
|
||
if (string2.startsWith("and")) {
|
||
d6 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d6.a(x.f, "and");
|
||
this.a(0, string2, "and".length(), d6);
|
||
bl = true;
|
||
}
|
||
if (!string2.startsWith("by")) break;
|
||
d6 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d6.a(x.d, "by");
|
||
this.a(2, string2, "by".length(), d6);
|
||
bl = true;
|
||
break;
|
||
}
|
||
case 2: {
|
||
for (int i4 = 0; i4 < this.a.length; ++i4) {
|
||
if (!string2.startsWith((String)((Object)this.b[i4]))) continue;
|
||
d d7 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d7.b(this.a[i4]);
|
||
d7.a(x.var_com_ccnode_codegenerator_n_x_a, this.a[i4]);
|
||
this.a(3, string2, this.a[i4].length(), d7);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 3: {
|
||
for (List<f> list : c) {
|
||
if (!string2.startsWith((String)((Object)list))) continue;
|
||
d d8 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d8.d((String)((Object)list));
|
||
d8.a(x.e, (String)((Object)list));
|
||
this.a(2, string2, ((String)((Object)list)).length(), d8);
|
||
bl = true;
|
||
}
|
||
for (String string4 : a) {
|
||
if (!string2.startsWith(string4)) continue;
|
||
d d9 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d9.c(string4);
|
||
d9.a(x.h, string4);
|
||
this.a(4, string2, string4.length(), d9);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
case 4: {
|
||
for (List<f> list : c) {
|
||
if (!string2.startsWith((String)((Object)list))) continue;
|
||
d d10 = d2.com_ccnode_codegenerator_G_d_e_d_a();
|
||
d10.d((String)((Object)list));
|
||
d10.a(x.e, (String)((Object)list));
|
||
this.a(2, string2, ((String)((Object)list)).length(), d10);
|
||
bl = true;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
if (!bl) {
|
||
f f3 = new f();
|
||
f3.a(d2);
|
||
f3.a(string2);
|
||
f3.a(n2);
|
||
this.c.add(f3);
|
||
}
|
||
}
|
||
|
||
private boolean a(int n2) {
|
||
return n2 == 1 || n2 == 3 || n2 == 4;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.G.f;
|
||
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.Comparator;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import javax.swing.BoxLayout;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JScrollPane;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends DialogWrapper {
|
||
private JCheckBox var_javax_swing_JCheckBox_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel var_javax_swing_JPanel_b = Lists.newArrayList();
|
||
private String var_java_lang_String_a;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private List<JRadioButton> var_java_util_List_javax_swing_JRadioButton__b;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private boolean var_boolean_a;
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BoxLayout(this.var_javax_swing_JPanel_a, 1));
|
||
this.var_javax_swing_JCheckBox_a.sort(Comparator.comparing(String::length));
|
||
Iterator iterator = this.var_javax_swing_JCheckBox_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
JRadioButton jRadioButton = new JRadioButton(string);
|
||
this.var_javax_swing_JPanel_b.add(jRadioButton);
|
||
buttonGroup.add(jRadioButton);
|
||
this.var_javax_swing_JPanel_a.add(jRadioButton);
|
||
}
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
public a(Project project, List<String> list) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_javax_swing_JCheckBox_a = list;
|
||
this.void_a();
|
||
this.setTitle("choose your primary key field");
|
||
this.init();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
Iterator iterator = this.var_javax_swing_JPanel_b.iterator();
|
||
while (iterator.hasNext()) {
|
||
JRadioButton jRadioButton = (JRadioButton)iterator.next();
|
||
if (!jRadioButton.isSelected()) continue;
|
||
this.var_java_lang_String_a = jRadioButton.getText();
|
||
}
|
||
if (StringUtils.isBlank((CharSequence)this.var_java_lang_String_a)) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"please choose one button", (String)"no button selected");
|
||
return;
|
||
}
|
||
this.var_boolean_a = this.var_javax_swing_JCheckBox_a.isSelected();
|
||
super.doOKAction();
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel, new GridConstraints(0, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_a.setSelected(true);
|
||
this.var_javax_swing_JCheckBox_a.setText("useGeneratedKey");
|
||
jPanel.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
this.var_javax_swing_JPanel_b.add((Component)jScrollPane, new GridConstraints(1, 0, 1, 2, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JPanel_a);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.g;
|
||
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
import java.util.List;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.G.b
|
||
*/
|
||
public class b_0 {
|
||
private e var_com_ccnode_codegenerator_G_a_e_a;
|
||
private Boolean var_java_lang_Boolean_a = false;
|
||
private Boolean b = true;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.b = bl;
|
||
}
|
||
|
||
public e com_ccnode_codegenerator_G_a_e_a() {
|
||
return this.var_com_ccnode_codegenerator_G_a_e_a;
|
||
}
|
||
|
||
public void a(e e2) {
|
||
this.var_com_ccnode_codegenerator_G_a_e_a = e2;
|
||
}
|
||
|
||
public Boolean b() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void b(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public List<String> a() {
|
||
return this.var_com_ccnode_codegenerator_G_a_e_a;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_com_ccnode_codegenerator_G_a_e_a = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.collect.Sets
|
||
*/
|
||
package com.ccnode.codegenerator.G.g;
|
||
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
import com.ccnode.codegenerator.G.a.f;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.freemarker.b;
|
||
import com.ccnode.codegenerator.freemarker.dto.ColumnAndFieldAndJdbcType;
|
||
import com.ccnode.codegenerator.g.b_0;
|
||
import com.ccnode.codegenerator.k.g;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.collect.Sets;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
|
||
public class a {
|
||
public static b_0 a(com.ccnode.codegenerator.G.c.a a2) {
|
||
b_0 b_02 = new b_0();
|
||
b_02.a(false);
|
||
e e2 = new e();
|
||
e2.a((com.ccnode.codegenerator.G.d.a.a)null);
|
||
e2.a(Sets.newHashSet((Object[])new String[]{"java.util.List"}));
|
||
e2.a(g.d);
|
||
e2.a("int");
|
||
e2.a(Lists.newArrayList((Object[])new com.ccnode.codegenerator.G.a.b[]{com.ccnode.codegenerator.G.a.b.com_ccnode_codegenerator_G_a_b$a_a().b("list").d(a2.java_lang_String_a()).a("List<" + a2.b() + ">").c("list").a()}));
|
||
f f2 = new f();
|
||
f2.a(a2.boolean_a());
|
||
HashMap hashMap = Maps.newHashMap();
|
||
List<ColumnAndFieldAndJdbcType> list = a2.a();
|
||
for (ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType : list) {
|
||
if (columnAndFieldAndJdbcType.getColumn() != null) continue;
|
||
columnAndFieldAndJdbcType.setColumn(n.e(columnAndFieldAndJdbcType.getField()));
|
||
}
|
||
if (a2.java_lang_Boolean_a().booleanValue()) {
|
||
for (ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType : list) {
|
||
if (!columnAndFieldAndJdbcType.getField().equals(a2.d())) continue;
|
||
if (a2.boolean_a()) {
|
||
f2.a(columnAndFieldAndJdbcType.getField());
|
||
}
|
||
list.remove(columnAndFieldAndJdbcType);
|
||
break;
|
||
}
|
||
}
|
||
hashMap.put("finalFields", list);
|
||
hashMap.put("tableName", a2.c());
|
||
hashMap.put("collectionName", "list");
|
||
hashMap.put("itemName", "element");
|
||
hashMap.put("currentDatabase", a2.e());
|
||
String string = b.a("insertList.ftl", hashMap);
|
||
e2.c(string);
|
||
e2.d("insertList");
|
||
e2.a(f2);
|
||
b_02.a(e2);
|
||
b_02.b(true);
|
||
return b_02;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.collect.Sets
|
||
*/
|
||
package com.ccnode.codegenerator.G.g;
|
||
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
import com.ccnode.codegenerator.G.a.f;
|
||
import com.ccnode.codegenerator.G.c.a;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.freemarker.dto.ColumnAndFieldAndJdbcType;
|
||
import com.ccnode.codegenerator.g.b_0;
|
||
import com.ccnode.codegenerator.k.g;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.collect.Sets;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
|
||
public class b {
|
||
public static b_0 a(a a2) {
|
||
b_0 b_02 = new b_0();
|
||
b_02.a(false);
|
||
e e2 = new e();
|
||
e2.a((com.ccnode.codegenerator.G.d.a.a)null);
|
||
e2.a(Sets.newHashSet((Object[])new String[]{"java.util.List"}));
|
||
e2.a(g.d);
|
||
e2.a("int");
|
||
String string = n.f(a2.b());
|
||
e2.a(Lists.newArrayList((Object[])new com.ccnode.codegenerator.G.a.b[]{com.ccnode.codegenerator.G.a.b.com_ccnode_codegenerator_G_a_b$a_a().d(a2.java_lang_String_a()).a(a2.b()).c(string).a()}));
|
||
f f2 = new f();
|
||
f2.a(a2.boolean_a());
|
||
HashMap hashMap = Maps.newHashMap();
|
||
List<ColumnAndFieldAndJdbcType> list = a2.a();
|
||
for (ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType : list) {
|
||
if (columnAndFieldAndJdbcType.getColumn() != null) continue;
|
||
columnAndFieldAndJdbcType.setColumn(n.e(columnAndFieldAndJdbcType.getField()));
|
||
}
|
||
if (a2.java_lang_Boolean_a().booleanValue()) {
|
||
for (ColumnAndFieldAndJdbcType columnAndFieldAndJdbcType : list) {
|
||
if (!columnAndFieldAndJdbcType.getField().equals(a2.d())) continue;
|
||
if (a2.boolean_a()) {
|
||
f2.a(columnAndFieldAndJdbcType.getField());
|
||
}
|
||
list.remove(columnAndFieldAndJdbcType);
|
||
break;
|
||
}
|
||
}
|
||
hashMap.put("finalFields", list);
|
||
hashMap.put("tableName", a2.c());
|
||
hashMap.put("collectionName", "list");
|
||
hashMap.put("itemName", "element");
|
||
hashMap.put("currentDatabase", a2.e());
|
||
String string2 = com.ccnode.codegenerator.freemarker.b.a("insert.ftl", hashMap);
|
||
e2.c(string2);
|
||
e2.d("insertListSelective");
|
||
e2.a(f2);
|
||
b_02.a(e2);
|
||
b_02.b(true);
|
||
return b_02;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.xml.XmlTag
|
||
*/
|
||
package com.ccnode.codegenerator.G.h;
|
||
|
||
import com.ccnode.codegenerator.G.a.e;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
|
||
public class a {
|
||
private XmlTag var_com_intellij_psi_xml_XmlTag_a;
|
||
private e var_com_ccnode_codegenerator_G_a_e_a;
|
||
|
||
public e com_ccnode_codegenerator_G_a_e_a() {
|
||
return this.var_com_ccnode_codegenerator_G_a_e_a;
|
||
}
|
||
|
||
public void a(e e2) {
|
||
this.var_com_ccnode_codegenerator_G_a_e_a = e2;
|
||
}
|
||
|
||
public XmlTag com_intellij_psi_xml_XmlTag_a() {
|
||
return this.var_com_intellij_psi_xml_XmlTag_a;
|
||
}
|
||
|
||
public void a(XmlTag xmlTag) {
|
||
this.var_com_intellij_psi_xml_XmlTag_a = xmlTag;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.ModificationTracker
|
||
*/
|
||
package com.ccnode.codegenerator.H;
|
||
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.ModificationTracker;
|
||
|
||
public interface c {
|
||
public static final ExtensionPointName<c> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.modificationTracker");
|
||
|
||
public ModificationTracker a(Project var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.ModificationTracker
|
||
*/
|
||
package com.ccnode.codegenerator.H;
|
||
|
||
import com.ccnode.codegenerator.H.c;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.ModificationTracker;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
public class d {
|
||
public static List<ModificationTracker> a(Project project) {
|
||
c[] cArray = (c[])c.a.getExtensions();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (c c2 : cArray) {
|
||
arrayList.add(c2.a(project));
|
||
}
|
||
return arrayList;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.util.SimpleModificationTracker
|
||
*/
|
||
package com.ccnode.codegenerator.H;
|
||
|
||
import com.intellij.openapi.util.SimpleModificationTracker;
|
||
|
||
public class e
|
||
extends SimpleModificationTracker {
|
||
private static final e a = new e();
|
||
|
||
public static e com_ccnode_codegenerator_H_e_a() {
|
||
return a;
|
||
}
|
||
|
||
private e() {
|
||
}
|
||
|
||
public int int_a() {
|
||
return (int)this.getModificationCount();
|
||
}
|
||
|
||
public void void_a() {
|
||
this.incModificationCount();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectState;
|
||
import com.ccnode.codegenerator.myconfigurable.TestConfiguration;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.Comparator;
|
||
import java.util.List;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.J.a
|
||
*/
|
||
public class a_0
|
||
extends DialogWrapper {
|
||
private final List<String> var_java_util_List_java_lang_String__a;
|
||
private JComboBox var_javax_swing_JComboBox_a;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
private JTextField var_javax_swing_JTextField_b = Lists.newArrayList();
|
||
private JTextField c;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private TestConfiguration var_com_ccnode_codegenerator_myconfigurable_TestConfiguration_a;
|
||
private List<TestConfiguration> var_java_util_List_com_ccnode_codegenerator_myconfigurable_TestConfiguration__b;
|
||
private ProjectState var_com_ccnode_codegenerator_myconfigurable_ProjectState_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
private void void_a() {
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, this.var_java_util_List_java_lang_String__a, (boolean)true, null);
|
||
}
|
||
|
||
public a_0(Project project, List<TestConfiguration> list, List<String> list2) {
|
||
super(project, true);
|
||
ProjectState projectState;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectState_a = projectState = e.com_ccnode_codegenerator_ag_e_e_a(project).a();
|
||
this.var_javax_swing_JTextField_b = list;
|
||
this.var_java_util_List_java_lang_String__a = list2;
|
||
this.b();
|
||
list.sort(new Comparator<TestConfiguration>(){
|
||
|
||
public int a(TestConfiguration testConfiguration, TestConfiguration testConfiguration2) {
|
||
return testConfiguration.getOrder() - testConfiguration2.getOrder();
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ int compare(Object object, Object object2) {
|
||
return this.a((TestConfiguration)object, (TestConfiguration)object2);
|
||
}
|
||
});
|
||
for (TestConfiguration testConfiguration : list) {
|
||
this.var_javax_swing_JComboBox_a.addItem(testConfiguration);
|
||
}
|
||
if (list.size() > 0) {
|
||
TestConfiguration testConfiguration = list.get(0);
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(testConfiguration);
|
||
this.b(testConfiguration);
|
||
}
|
||
this.var_javax_swing_JComboBox_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
TestConfiguration testConfiguration = (TestConfiguration)a_0.this.var_javax_swing_JComboBox_a.getSelectedItem();
|
||
if (testConfiguration != null) {
|
||
a_0.this.b(testConfiguration);
|
||
}
|
||
}
|
||
});
|
||
this.setTitle("setUp database for mybatis");
|
||
this.init();
|
||
}
|
||
|
||
private void b(TestConfiguration testConfiguration) {
|
||
this.var_javax_swing_JTextField_a.setText(testConfiguration.getUrl());
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText(testConfiguration.getDriverClass());
|
||
this.var_javax_swing_JTextField_b.setText(testConfiguration.getUserName());
|
||
this.c.setText(testConfiguration.getPassword());
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
TestConfiguration testConfiguration = new TestConfiguration(this.var_javax_swing_JTextField_a.getText(), this.var_javax_swing_JTextField_b.getText(), this.c.getText(), false, this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText(), "history", -1);
|
||
List<TestConfiguration> list = this.var_com_ccnode_codegenerator_myconfigurable_ProjectState_a.getTestConfigurations();
|
||
list.removeIf(testConfiguration2 -> testConfiguration2.getUrl().equals(testConfiguration.getUrl()));
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectState_a.getTestConfigurations().add(testConfiguration);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectState_a.setLastUsedTestConfiguration(testConfiguration);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TestConfiguration_a = testConfiguration;
|
||
super.doOKAction();
|
||
}
|
||
|
||
public TestConfiguration com_ccnode_codegenerator_myconfigurable_TestConfiguration_a() {
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_TestConfiguration_a;
|
||
}
|
||
|
||
public void a(TestConfiguration testConfiguration) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TestConfiguration_a = testConfiguration;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "configuration"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
jPanel.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(2, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel2, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "url"));
|
||
jPanel2.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel2.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "driverclass"));
|
||
jPanel2.add((Component)jLabel3, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel2.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_a, new GridConstraints(1, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
this.a(jLabel4, this.a("i18n/i18n", "username"));
|
||
jPanel2.add((Component)jLabel4, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
jPanel2.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(2, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
this.a(jLabel5, this.a("i18n/i18n", "password"));
|
||
jPanel2.add((Component)jLabel5, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.c = new JTextField();
|
||
jPanel2.add((Component)this.c, new GridConstraints(3, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.IntellijDatabaseUserNameAndPassword;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.J.b
|
||
*/
|
||
public class b_0
|
||
extends DialogWrapper {
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTextField b;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private IntellijDatabaseUserNameAndPassword var_com_ccnode_codegenerator_myconfigurable_IntellijDatabaseUserNameAndPassword_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public b_0(Project project) {
|
||
super(project, false);
|
||
this.void_a();
|
||
this.setTitle("set username and password for intellij database");
|
||
this.init();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_IntellijDatabaseUserNameAndPassword_a = new IntellijDatabaseUserNameAndPassword(this.b.getText(), this.var_javax_swing_JTextField_a.getText());
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public IntellijDatabaseUserNameAndPassword com_ccnode_codegenerator_myconfigurable_IntellijDatabaseUserNameAndPassword_a() {
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_IntellijDatabaseUserNameAndPassword_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(0, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "username1"));
|
||
this.var_javax_swing_JPanel_a.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "password1"));
|
||
this.var_javax_swing_JPanel_a.add((Component)jLabel2, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
this.var_javax_swing_JTextField_a.setText("");
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(1, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.b = new JTextField();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.b, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel.add((Component)spacer, new GridConstraints(1, 0, 1, 2, 0, 2, 1, 4, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
*/
|
||
package com.ccnode.codegenerator.j;
|
||
|
||
import com.ccnode.codegenerator.ad.z;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseConnector;
|
||
import com.ccnode.codegenerator.l.b.b;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.TestConfiguration;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import java.util.ArrayList;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.J.c
|
||
*/
|
||
public class c_0
|
||
implements b {
|
||
public static TestConfiguration a(NewDatabaseInfo newDatabaseInfo, Project project, String string, Integer n2) {
|
||
boolean bl = c_0.a(project);
|
||
String string2 = DatabaseConnector.INSTANCE.buildDriverClassNameByDatabaseType(newDatabaseInfo.getDatabaseType());
|
||
if (newDatabaseInfo.getDatabaseType().equals("MySql") && !bl) {
|
||
string2 = "com.mysql.jdbc.Driver";
|
||
}
|
||
return new TestConfiguration(newDatabaseInfo.toString(), newDatabaseInfo.getUserName(), newDatabaseInfo.getPassword(), false, string2, string, n2);
|
||
}
|
||
|
||
@Override
|
||
public List<TestConfiguration> a(Project project) {
|
||
e e2 = e.com_ccnode_codegenerator_ag_e_e_a(project);
|
||
List<NewDatabaseInfo> list = e2.a().getDatabaseInfos();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (NewDatabaseInfo object2 : list) {
|
||
arrayList.add(c_0.a(object2, project, "mybatis datasource", 1));
|
||
}
|
||
List<TestConfiguration> list2 = e2.a().getTestConfigurations();
|
||
Iterator iterator = list2.iterator();
|
||
while (iterator.hasNext()) {
|
||
TestConfiguration testConfiguration = (TestConfiguration)iterator.next();
|
||
TestConfiguration testConfiguration2 = (TestConfiguration)z.a().deepClone((Object)testConfiguration);
|
||
if (e2.a().getLastUsedTestConfiguration().equals(testConfiguration)) {
|
||
testConfiguration2.setOrder(-2);
|
||
testConfiguration2.setFrom("lastUsed");
|
||
}
|
||
arrayList.add(testConfiguration2);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
private static boolean a(Project project) {
|
||
boolean bl = true;
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass("com.mysql.cj.jdbc.Driver", GlobalSearchScope.allScope((Project)project));
|
||
if (psiClass == null) {
|
||
bl = false;
|
||
}
|
||
return bl;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.MyColumnOverride;
|
||
import com.ccnode.codegenerator.myconfigurable.MyIgnoredColumn;
|
||
import com.google.common.collect.Lists;
|
||
import java.util.List;
|
||
|
||
public class b {
|
||
List<MyColumnOverride> a = Lists.newArrayList();
|
||
List<MyIgnoredColumn> b = Lists.newArrayList();
|
||
|
||
public List<MyColumnOverride> a() {
|
||
return this.a;
|
||
}
|
||
|
||
public List<MyIgnoredColumn> b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(List<MyColumnOverride> list) {
|
||
this.a = list;
|
||
}
|
||
|
||
public void b(List<MyIgnoredColumn> list) {
|
||
this.b = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.io.Files
|
||
* com.intellij.ide.highlighter.JavaFileType
|
||
* com.intellij.lang.Language
|
||
* com.intellij.lang.java.JavaLanguage
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.ui.EditorTextField
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* kotlin.Pair
|
||
* org.apache.commons.io.IOUtils
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.apache.commons.lang.exception.ExceptionUtils
|
||
* org.codehaus.janino.JavaSourceClassLoader
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.PropertyNameConverter;
|
||
import com.google.common.io.Files;
|
||
import com.intellij.ide.highlighter.JavaFileType;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.lang.java.JavaLanguage;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.ui.EditorTextField;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.File;
|
||
import java.io.FileOutputStream;
|
||
import java.io.IOException;
|
||
import java.io.OutputStream;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
import kotlin.Pair;
|
||
import org.apache.commons.io.IOUtils;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||
import org.codehaus.janino.JavaSourceClassLoader;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends DialogWrapper {
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
@Nullable
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Document var_com_intellij_openapi_editor_Document_a;
|
||
private Pair<String, String> var_kotlin_Pair_java_lang_String,_java_lang_String__a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
protected c(@Nullable Project project) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.void_a();
|
||
this.setOKButtonText("saveAndExit");
|
||
this.setTitle("Config Java Method");
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = c.this.var_com_intellij_openapi_editor_Document_a.getText();
|
||
try {
|
||
PropertyNameConverter propertyNameConverter = c.a(string);
|
||
String string2 = Messages.showInputDialog((String)"input your colum name to check", (String)"check method", null);
|
||
if (StringUtils.isNotBlank((String)string2)) {
|
||
Messages.showMessageDialog((Project)c.this.var_com_intellij_openapi_project_Project_a, (String)("convert result is:" + propertyNameConverter.convertColumnNameToPropertyName(string2)), (String)"result", null);
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)c.this.var_com_intellij_openapi_project_Project_a, (String)ExceptionUtils.getStackTrace((Throwable)exception), (String)"error");
|
||
}
|
||
}
|
||
});
|
||
this.init();
|
||
}
|
||
|
||
public static PropertyNameConverter a(String string) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {
|
||
String string2 = PropertyNameConverter.class.getCanonicalName();
|
||
String string3 = string.replace("ConverterImpl", "ConverterImpl implements " + string2);
|
||
JavaSourceClassLoader javaSourceClassLoader = new JavaSourceClassLoader(c.class.getClassLoader());
|
||
File file = Files.createTempDir();
|
||
String string4 = file.getAbsolutePath();
|
||
String string5 = string4 + "/ConverterImpl.java";
|
||
File file2 = new File(string5);
|
||
IOUtils.write((String)string3, (OutputStream)new FileOutputStream(file2), (String)"UTF-8");
|
||
javaSourceClassLoader.setSourcePath(new File[]{file});
|
||
Class clazz = javaSourceClassLoader.loadClass("ConverterImpl");
|
||
PropertyNameConverter propertyNameConverter = (PropertyNameConverter)clazz.newInstance();
|
||
return propertyNameConverter;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.var_javax_swing_JTextField_a = new Pair((Object)this.var_javax_swing_JTextField_a.getText(), (Object)this.var_com_intellij_openapi_editor_Document_a.getText());
|
||
super.doOKAction();
|
||
}
|
||
|
||
public Pair<String, String> a() {
|
||
return this.var_javax_swing_JTextField_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
if (StringUtils.isBlank((String)this.var_javax_swing_JTextField_a.getText())) {
|
||
return new ValidationInfo("profile name should not be blank", (JComponent)this.var_javax_swing_JTextField_a);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private void void_a() {
|
||
this.b();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "profilename"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(2, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel2, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel2.add((Component)this.var_com_intellij_ui_EditorTextField_a, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "methodcontent"));
|
||
jPanel2.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "testmethod"));
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(2, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void b() {
|
||
String string = "\nimport org.apache.commons.lang3.StringUtils;\npublic class ConverterImpl {\n public String convertColumnNameToPropertyName(String columnName) {\n // TODO: fill content in method, you can use method from commonslang3 and guava\n return columnName;\n }\n}\n";
|
||
PsiFile psiFile = PsiFileFactory.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).createFileFromText("ConverterImpl.java", (Language)JavaLanguage.INSTANCE, (CharSequence)string);
|
||
this.var_com_intellij_openapi_editor_Document_a = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDocument(psiFile);
|
||
this.var_com_intellij_ui_EditorTextField_a = new EditorTextField(this.var_com_intellij_openapi_editor_Document_a, this.var_com_intellij_openapi_project_Project_a, (FileType)JavaFileType.INSTANCE);
|
||
this.var_com_intellij_ui_EditorTextField_a.setOneLineMode(false);
|
||
this.var_com_intellij_ui_EditorTextField_a.setAutoscrolls(true);
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.ui.AddEditDeleteListPanel
|
||
* kotlin.Pair
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.c;
|
||
import com.ccnode.codegenerator.mybatisGenerator.w;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.ui.AddEditDeleteListPanel;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import kotlin.Pair;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d
|
||
extends AddEditDeleteListPanel<w> {
|
||
private Project a;
|
||
|
||
public d(Project project, String string, List<w> list) {
|
||
super(string, list);
|
||
this.a = project;
|
||
}
|
||
|
||
@Nullable
|
||
protected w a(w w2) {
|
||
Messages.showInfoMessage((Project)this.a, (String)"Current not support edit, Will be support soon", (String)"Edit not Support Now");
|
||
return null;
|
||
}
|
||
|
||
public void a(List<w> list) {
|
||
this.myListModel.clear();
|
||
list.stream().forEach(this.myListModel::addElement);
|
||
}
|
||
|
||
@Nullable
|
||
protected w a() {
|
||
c c2 = new c(this.a);
|
||
boolean bl = c2.showAndGet();
|
||
if (bl) {
|
||
Pair<String, String> pair = c2.a();
|
||
w w2 = new w();
|
||
w2.b((String)pair.getSecond());
|
||
w2.a((String)pair.getFirst());
|
||
return w2;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public List<w> a() {
|
||
Object[] objectArray;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (Object object : objectArray = this.getListItems()) {
|
||
arrayList.add((w)object);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Nullable
|
||
protected /* synthetic */ Object editSelectedItem(Object object) {
|
||
return this.a((w)object);
|
||
}
|
||
|
||
@Nullable
|
||
protected /* synthetic */ Object findItemToAdd() {
|
||
return this.a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.search.SearchScope
|
||
* com.intellij.psi.search.searches.ClassInheritorsSearch
|
||
* com.intellij.util.Query
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import com.ccnode.codegenerator.n.b;
|
||
import com.ccnode.codegenerator.n.e.f;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.search.SearchScope;
|
||
import com.intellij.psi.search.searches.ClassInheritorsSearch;
|
||
import com.intellij.util.Query;
|
||
import java.awt.Dimension;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.List;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JTable;
|
||
|
||
public class e
|
||
extends JTable {
|
||
public static String[] var_java_lang_String_arr_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
|
||
public e(List<a> list, Project project) {
|
||
super(e.a(list), var_java_lang_String_arr_a);
|
||
this.getTableHeader().setReorderingAllowed(false);
|
||
this.getColumn("Checked").setCellRenderer(new b());
|
||
this.getColumn("Checked").setCellEditor(new com.ccnode.codegenerator.n.a(new JCheckBox()));
|
||
this.getColumn("Java Type").setPreferredWidth(120);
|
||
this.getColumn("Java Type").setCellEditor(new f(project));
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass("org.apache.ibatis.type.JdbcType", GlobalSearchScope.allScope((Project)project));
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
if (psiClass != null) {
|
||
for (PsiField object : psiClass.getFields()) {
|
||
arrayList.add(object.getName());
|
||
}
|
||
}
|
||
this.getColumn("Jdbc Type").setCellEditor(new com.ccnode.codegenerator.n.e.b(project, new ArrayList<String>(arrayList)));
|
||
this.getColumn("Property Name").setPreferredWidth(120);
|
||
this.getColumn("Column Name").setPreferredWidth(120);
|
||
ArrayList arrayList2 = Lists.newArrayList();
|
||
PsiClass psiClass2 = JavaPsiFacade.getInstance((Project)project).findClass("org.apache.ibatis.type.TypeHandler", GlobalSearchScope.allScope((Project)project));
|
||
if (psiClass2 != null) {
|
||
Query query = ClassInheritorsSearch.search((PsiClass)psiClass2, (SearchScope)GlobalSearchScope.allScope((Project)project), (boolean)true);
|
||
Collection collection = query.findAll();
|
||
for (PsiClass psiClass3 : collection) {
|
||
String string = psiClass3.getQualifiedName();
|
||
if (string == null || arrayList2.contains(string)) continue;
|
||
arrayList2.add(string);
|
||
}
|
||
}
|
||
this.getColumn("Type Handler").setCellEditor(new com.ccnode.codegenerator.n.e.b(project, arrayList2));
|
||
this.setRowHeight(25);
|
||
this.setFillsViewportHeight(true);
|
||
this.setAutoResizeMode(4);
|
||
}
|
||
|
||
static Object[][] a(List<a> list) {
|
||
Object[][] objectArray = new Object[list.size()][6];
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
a a2 = list.get(i2);
|
||
objectArray[i2][0] = a2.boolean_a();
|
||
objectArray[i2][1] = a2.java_lang_String_a();
|
||
objectArray[i2][2] = a2.java_lang_String_b();
|
||
objectArray[i2][3] = a2.d();
|
||
objectArray[i2][4] = a2.c();
|
||
objectArray[i2][5] = a2.e();
|
||
}
|
||
return objectArray;
|
||
}
|
||
|
||
static Boolean java_lang_Boolean_a(Object object) {
|
||
if (object == null) {
|
||
return false;
|
||
}
|
||
if (!(object instanceof Boolean)) {
|
||
return false;
|
||
}
|
||
return (Boolean)object;
|
||
}
|
||
|
||
static String java_lang_String_a(Object object) {
|
||
if (object == null) {
|
||
return "";
|
||
}
|
||
if (!(object instanceof String)) {
|
||
throw new com.ccnode.codegenerator.n.c.a();
|
||
}
|
||
return ((String)object).trim();
|
||
}
|
||
|
||
@Override
|
||
public Dimension getPreferredScrollableViewportSize() {
|
||
int n2 = this.getTableHeader().getPreferredSize().height;
|
||
int n3 = n2 + 10 * this.getRowHeight();
|
||
int n4 = this.getPreferredSize().width;
|
||
return new Dimension(n4, n3);
|
||
}
|
||
|
||
@Override
|
||
public boolean isCellEditable(int n2, int n3) {
|
||
return n3 != 1;
|
||
}
|
||
|
||
@Override
|
||
public void setValueAt(Object object, int n2, int n3) {
|
||
super.setValueAt(object, n2, n3);
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_arr_a = new String[]{"Checked", "Column Name", "Jdbc Type", "Java Type", "Property Name", "Type Handler"};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.intellij.database.model.DasColumn
|
||
* com.intellij.database.model.DasDataSource
|
||
* com.intellij.database.model.DasNamespace
|
||
* com.intellij.database.model.DasObject
|
||
* com.intellij.database.model.DasTable
|
||
* com.intellij.database.model.ObjectKind
|
||
* com.intellij.database.psi.DbDataSource
|
||
* com.intellij.database.psi.DbElement
|
||
* com.intellij.database.psi.DbTable
|
||
* com.intellij.database.util.DasUtil
|
||
* com.intellij.util.ObjectUtils
|
||
* com.intellij.util.containers.JBIterable
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
* org.mybatis.generator.api.intellij.IntellijColumnInfo
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.a.a;
|
||
|
||
import com.ccnode.codegenerator.ad.r;
|
||
import com.ccnode.codegenerator.ag.d.j;
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.TypeUtils;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.intellij.database.model.DasColumn;
|
||
import com.intellij.database.model.DasDataSource;
|
||
import com.intellij.database.model.DasNamespace;
|
||
import com.intellij.database.model.DasObject;
|
||
import com.intellij.database.model.DasTable;
|
||
import com.intellij.database.model.ObjectKind;
|
||
import com.intellij.database.psi.DbDataSource;
|
||
import com.intellij.database.psi.DbElement;
|
||
import com.intellij.database.psi.DbTable;
|
||
import com.intellij.database.util.DasUtil;
|
||
import com.intellij.util.ObjectUtils;
|
||
import com.intellij.util.containers.JBIterable;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
import org.mybatis.generator.api.intellij.IntellijColumnInfo;
|
||
|
||
public class a
|
||
implements com.ccnode.codegenerator.mybatisGenerator.a.a {
|
||
private DbDataSource var_com_intellij_database_psi_DbDataSource_a;
|
||
private String var_java_lang_String_a;
|
||
private DbTable var_com_intellij_database_psi_DbTable_a;
|
||
|
||
public a(DbDataSource dbDataSource, String string) {
|
||
this.var_com_intellij_database_psi_DbDataSource_a = dbDataSource;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public a(DbTable dbTable) {
|
||
this.var_com_intellij_database_psi_DbTable_a = dbTable;
|
||
this.var_java_lang_String_a = DasUtil.getSchema((DasObject)dbTable);
|
||
this.var_com_intellij_database_psi_DbDataSource_a = dbTable.getDataSource();
|
||
}
|
||
|
||
@Override
|
||
public List<String> a() {
|
||
JBIterable jBIterable = DasUtil.getTables((DasDataSource)this.var_com_intellij_database_psi_DbDataSource_a);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (DasTable dasTable : jBIterable) {
|
||
if (!DasUtil.getSchema((DasObject)dasTable).equals(this.var_java_lang_String_a)) continue;
|
||
arrayList.add(dasTable.getName());
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Override
|
||
public t com_ccnode_codegenerator_mybatisGenerator_t_a(String string) {
|
||
Object object;
|
||
Object object2;
|
||
DbTable dbTable = null;
|
||
dbTable = this.var_com_intellij_database_psi_DbTable_a != null && this.var_com_intellij_database_psi_DbTable_a.getName().equals(string) ? this.var_com_intellij_database_psi_DbTable_a : this.com_intellij_database_psi_DbTable_a(string);
|
||
if (dbTable == null) {
|
||
return null;
|
||
}
|
||
IntellijTableInfo intellijTableInfo = j.org_mybatis_generator_api_IntellijTableInfo_a(dbTable);
|
||
t t2 = new t();
|
||
List<com.ccnode.codegenerator.mybatisGenerator.a> list = u.a(intellijTableInfo, com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getUsejava8LocalDateTimeEct());
|
||
Profile profile = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
if (profile.getUseTypeMapper()) {
|
||
object2 = DasUtil.getColumns((DasObject)dbTable);
|
||
object = Maps.newHashMap();
|
||
Object object3 = object2.iterator();
|
||
while (object3.hasNext()) {
|
||
DasColumn object4 = (DasColumn)object3.next();
|
||
object.put(object4.getName(), object4);
|
||
}
|
||
for (com.ccnode.codegenerator.mybatisGenerator.a a2 : list) {
|
||
DasColumn dasColumn = (DasColumn)object.get(a2.java_lang_String_a());
|
||
a2.c(TypeUtils.getColumnType(dasColumn.getDasType().toDataType().getSpecification()));
|
||
}
|
||
}
|
||
t2.b(list);
|
||
object2 = Lists.newArrayList();
|
||
for (Object object3 : intellijTableInfo.getPrimaryKeyColumns()) {
|
||
object2.add(object3.getName());
|
||
}
|
||
t2.a((List<String>)object2);
|
||
object = Lists.newArrayList();
|
||
for (IntellijColumnInfo intellijColumnInfo : intellijTableInfo.getPrimaryKeyColumns()) {
|
||
if (!intellijColumnInfo.isGeneratedColumn()) continue;
|
||
object.add(intellijColumnInfo.getName());
|
||
}
|
||
if (object.size() == 1) {
|
||
t2.a((String)object.get(0));
|
||
}
|
||
t2.b(intellijTableInfo.getTableRemark());
|
||
return t2;
|
||
}
|
||
|
||
@Override
|
||
public NewDatabaseInfo com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a() {
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
public IntellijTableInfo org_mybatis_generator_api_IntellijTableInfo_a(String string) {
|
||
DbTable dbTable = null;
|
||
dbTable = this.var_com_intellij_database_psi_DbTable_a != null && this.var_com_intellij_database_psi_DbTable_a.getName().equals(string) ? this.var_com_intellij_database_psi_DbTable_a : this.com_intellij_database_psi_DbTable_a(string);
|
||
if (dbTable == null) {
|
||
return null;
|
||
}
|
||
return j.org_mybatis_generator_api_IntellijTableInfo_a(dbTable);
|
||
}
|
||
|
||
@Override
|
||
public List<String> b() {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
DasObject dasObject = DasUtil.getSchemaObject((DasObject)this.var_com_intellij_database_psi_DbTable_a);
|
||
DasNamespace dasNamespace = (DasNamespace)ObjectUtils.tryCast((Object)dasObject, DasNamespace.class);
|
||
if (dasNamespace != null) {
|
||
JBIterable jBIterable = dasNamespace.getDasChildren(ObjectKind.SEQUENCE);
|
||
for (DasObject dasObject2 : jBIterable) {
|
||
String string = dasObject2.getName();
|
||
arrayList.add(string);
|
||
}
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Nullable
|
||
private DbTable com_intellij_database_psi_DbTable_a(String string) {
|
||
JBIterable jBIterable = DasUtil.getTables((DasDataSource)this.var_com_intellij_database_psi_DbDataSource_a);
|
||
DbTable dbTable = null;
|
||
for (DasTable dasTable : jBIterable) {
|
||
DbElement dbElement;
|
||
if (!DasUtil.getSchema((DasObject)dasTable).equals(this.var_java_lang_String_a) || !dasTable.getName().equals(string) || !((dbElement = r.a(this.var_com_intellij_database_psi_DbDataSource_a, dasTable)) instanceof DbTable)) continue;
|
||
dbTable = (DbTable)dbElement;
|
||
}
|
||
if (dbTable == null) {
|
||
return null;
|
||
}
|
||
return dbTable;
|
||
}
|
||
|
||
@Override
|
||
public String java_lang_String_a() {
|
||
String string = this.var_com_intellij_database_psi_DbDataSource_a.getConnectionConfig().getUrl();
|
||
return j.a(string);
|
||
}
|
||
|
||
@Override
|
||
public String b() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.dci.intellij.dbn.object.DBColumn
|
||
* com.dci.intellij.dbn.object.DBDataset
|
||
* com.dci.intellij.dbn.object.DBSchema
|
||
* com.dci.intellij.dbn.object.DBTable
|
||
* com.dci.intellij.dbn.object.DBView
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
* org.mybatis.generator.api.intellij.IntellijColumnInfo
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.a.b;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.TypeUtils;
|
||
import com.dci.intellij.dbn.object.DBColumn;
|
||
import com.dci.intellij.dbn.object.DBDataset;
|
||
import com.dci.intellij.dbn.object.DBSchema;
|
||
import com.dci.intellij.dbn.object.DBTable;
|
||
import com.dci.intellij.dbn.object.DBView;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import java.util.ArrayList;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
import org.mybatis.generator.api.intellij.IntellijColumnInfo;
|
||
|
||
public class a
|
||
implements com.ccnode.codegenerator.mybatisGenerator.a.a {
|
||
private DBSchema var_com_dci_intellij_dbn_object_DBSchema_a;
|
||
private String var_java_lang_String_a;
|
||
private DBDataset var_com_dci_intellij_dbn_object_DBDataset_a;
|
||
|
||
public a(DBSchema dBSchema, String string) {
|
||
this.var_com_dci_intellij_dbn_object_DBSchema_a = dBSchema;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public a(DBDataset dBDataset) {
|
||
this.var_com_dci_intellij_dbn_object_DBDataset_a = dBDataset;
|
||
this.var_java_lang_String_a = dBDataset.getSchema().getName();
|
||
this.var_com_dci_intellij_dbn_object_DBSchema_a = dBDataset.getSchema();
|
||
}
|
||
|
||
@Override
|
||
public List<String> a() {
|
||
ArrayList arrayList;
|
||
block4: {
|
||
block5: {
|
||
block3: {
|
||
arrayList = Lists.newArrayList();
|
||
if (!(this.var_com_dci_intellij_dbn_object_DBDataset_a instanceof DBTable)) break block3;
|
||
List list = this.var_com_dci_intellij_dbn_object_DBSchema_a.getTables();
|
||
for (DBTable dBTable : list) {
|
||
if (!dBTable.getSchema().getName().equals(this.var_java_lang_String_a)) continue;
|
||
arrayList.add(dBTable.getName());
|
||
}
|
||
break block4;
|
||
}
|
||
if (!(this.var_com_dci_intellij_dbn_object_DBDataset_a instanceof DBView)) break block5;
|
||
List list = this.var_com_dci_intellij_dbn_object_DBSchema_a.getViews();
|
||
for (DBView dBView : list) {
|
||
if (!dBView.getSchema().getName().equals(this.var_java_lang_String_a)) continue;
|
||
arrayList.add(dBView.getName());
|
||
}
|
||
break block4;
|
||
}
|
||
if (this.var_com_dci_intellij_dbn_object_DBDataset_a != null) break block4;
|
||
List list = this.var_com_dci_intellij_dbn_object_DBSchema_a.getTables();
|
||
for (DBTable dBTable : list) {
|
||
if (!dBTable.getSchema().getName().equals(this.var_java_lang_String_a)) continue;
|
||
arrayList.add(dBTable.getName());
|
||
}
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Override
|
||
public t com_ccnode_codegenerator_mybatisGenerator_t_a(String string) {
|
||
Object object;
|
||
List list;
|
||
DBDataset dBDataset = null;
|
||
dBDataset = this.var_com_dci_intellij_dbn_object_DBDataset_a != null && this.var_com_dci_intellij_dbn_object_DBDataset_a.getName().equals(string) ? this.var_com_dci_intellij_dbn_object_DBDataset_a : this.com_dci_intellij_dbn_object_DBDataset_a(string);
|
||
if (dBDataset == null) {
|
||
return null;
|
||
}
|
||
IntellijTableInfo intellijTableInfo = com.ccnode.codegenerator.m.a.org_mybatis_generator_api_IntellijTableInfo_a(dBDataset);
|
||
t t2 = new t();
|
||
List<com.ccnode.codegenerator.mybatisGenerator.a> list2 = u.a(intellijTableInfo, com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getUsejava8LocalDateTimeEct());
|
||
Profile profile = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
if (profile.getUseTypeMapper()) {
|
||
list = dBDataset.getColumns();
|
||
object = Maps.newHashMap();
|
||
for (DBColumn object2 : list) {
|
||
object.put(object2.getName(), object2);
|
||
}
|
||
for (com.ccnode.codegenerator.mybatisGenerator.a a2 : list2) {
|
||
DBColumn dBColumn = (DBColumn)object.get(a2.java_lang_String_a());
|
||
a2.c(TypeUtils.getColumnType(dBColumn.getDataType().getSpecification()));
|
||
}
|
||
}
|
||
t2.b(list2);
|
||
list = Lists.newArrayList();
|
||
for (Iterator<Object> iterator : intellijTableInfo.getPrimaryKeyColumns()) {
|
||
list.add(iterator.getName());
|
||
}
|
||
t2.a(list);
|
||
object = Lists.newArrayList();
|
||
for (IntellijColumnInfo intellijColumnInfo : intellijTableInfo.getPrimaryKeyColumns()) {
|
||
if (!intellijColumnInfo.isGeneratedColumn()) continue;
|
||
object.add(intellijColumnInfo.getName());
|
||
}
|
||
if (object.size() == 1) {
|
||
t2.a((String)object.get(0));
|
||
}
|
||
t2.b(intellijTableInfo.getTableRemark());
|
||
return t2;
|
||
}
|
||
|
||
@Override
|
||
public NewDatabaseInfo com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a() {
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
public IntellijTableInfo org_mybatis_generator_api_IntellijTableInfo_a(String string) {
|
||
DBDataset dBDataset = null;
|
||
dBDataset = this.var_com_dci_intellij_dbn_object_DBDataset_a != null && this.var_com_dci_intellij_dbn_object_DBDataset_a.getName().equals(string) ? this.var_com_dci_intellij_dbn_object_DBDataset_a : this.com_dci_intellij_dbn_object_DBDataset_a(string);
|
||
if (dBDataset == null) {
|
||
return null;
|
||
}
|
||
return com.ccnode.codegenerator.m.a.org_mybatis_generator_api_IntellijTableInfo_a(dBDataset);
|
||
}
|
||
|
||
@Override
|
||
public List<String> b() {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
return arrayList;
|
||
}
|
||
|
||
@Nullable
|
||
private DBDataset com_dci_intellij_dbn_object_DBDataset_a(String string) {
|
||
Object object3;
|
||
List list = this.var_com_dci_intellij_dbn_object_DBSchema_a.getTables();
|
||
Object object2 = null;
|
||
for (Object object3 : list) {
|
||
if (!object3.getSchema().getName().equals(this.var_java_lang_String_a) || !object3.getName().equals(string)) continue;
|
||
object2 = object3;
|
||
return object2;
|
||
}
|
||
List list2 = this.var_com_dci_intellij_dbn_object_DBSchema_a.getViews();
|
||
object3 = list2.iterator();
|
||
while (object3.hasNext()) {
|
||
DBView dBView = (DBView)object3.next();
|
||
if (!dBView.getSchema().getName().equals(this.var_java_lang_String_a) || !dBView.getName().equals(string)) continue;
|
||
return dBView;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
public String java_lang_String_a() {
|
||
return com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDatabase();
|
||
}
|
||
|
||
@Override
|
||
public String b() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.a;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
|
||
public interface a {
|
||
public List<String> a();
|
||
|
||
public t com_ccnode_codegenerator_mybatisGenerator_t_a(String var1);
|
||
|
||
public NewDatabaseInfo com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a();
|
||
|
||
public IntellijTableInfo org_mybatis_generator_api_IntellijTableInfo_a(String var1);
|
||
|
||
public List<String> b();
|
||
|
||
public String java_lang_String_a();
|
||
|
||
public String b();
|
||
|
||
default public boolean boolean_a() {
|
||
return this.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a() == null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.a;
|
||
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseConnector;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseInfo;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.TableInfo;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.TableInfoFromDatabaseConnection;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
|
||
public class b
|
||
implements com.ccnode.codegenerator.mybatisGenerator.a.a {
|
||
private NewDatabaseInfo var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
|
||
public b(NewDatabaseInfo newDatabaseInfo, Project project) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a = newDatabaseInfo;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public List<String> a() {
|
||
DatabaseInfo databaseInfo = DatabaseConnector.INSTANCE.getDataBaseInfoFromConnection(this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a, false);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
List<TableInfo> list = databaseInfo.getTableInfoList();
|
||
for (TableInfo tableInfo : list) {
|
||
arrayList.add(tableInfo.getTableName());
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
@Override
|
||
public t com_ccnode_codegenerator_mybatisGenerator_t_a(String string) {
|
||
TableInfoFromDatabaseConnection tableInfoFromDatabaseConnection = DatabaseConnector.INSTANCE.getTableInfoFromConnection(this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a, string, com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getUsejava8LocalDateTimeEct());
|
||
t t2 = new t();
|
||
List<a> list = tableInfoFromDatabaseConnection.getColumnInfos();
|
||
t2.b(list);
|
||
List<String> list2 = tableInfoFromDatabaseConnection.getGeneratedPrimayKey();
|
||
if (list2.size() == 1) {
|
||
t2.a(list2.get(0));
|
||
}
|
||
t2.a(tableInfoFromDatabaseConnection.getPrimaryColumns());
|
||
return t2;
|
||
}
|
||
|
||
@Override
|
||
public NewDatabaseInfo com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a() {
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a;
|
||
}
|
||
|
||
@Override
|
||
public IntellijTableInfo org_mybatis_generator_api_IntellijTableInfo_a(String string) {
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
public List<String> b() {
|
||
return Lists.newArrayList();
|
||
}
|
||
|
||
@Override
|
||
public String java_lang_String_a() {
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a.getDatabaseType();
|
||
}
|
||
|
||
@Override
|
||
public String b() {
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a.getDatabase();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
|
||
public class f {
|
||
public String var_java_lang_String_a;
|
||
public String b;
|
||
private static Map<String, f> var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_mybatisGenerator_f__a;
|
||
|
||
public f(String string, String string2) {
|
||
this.var_java_lang_String_a = string;
|
||
this.b = string2;
|
||
}
|
||
|
||
public f(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
this.b = string;
|
||
}
|
||
|
||
public static f com_ccnode_codegenerator_mybatisGenerator_f_a(String string) {
|
||
if (var_java_lang_String_a.containsKey(string)) {
|
||
return (f)var_java_lang_String_a.get(string);
|
||
}
|
||
return new f("\"");
|
||
}
|
||
|
||
public String a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void void_a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof f)) {
|
||
return false;
|
||
}
|
||
f f2 = (f)object;
|
||
if (!f2.a(this)) {
|
||
return false;
|
||
}
|
||
String string = this.a();
|
||
String string2 = f2.a();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
String string3 = this.b();
|
||
String string4 = f2.b();
|
||
return !(string3 == null ? string4 != null : !string3.equals(string4));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof f;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.a();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
String string2 = this.b();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "Delimters(beginDelimeter=" + this.a() + ", endDelimter=" + this.b() + ")";
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_a = new HashMap<String, f>(){
|
||
{
|
||
this.put("MySql", new f("`"));
|
||
this.put("Oracle", new f("\""));
|
||
this.put("PostgreSQL", new f("\""));
|
||
this.put("SqlServer", new f("[", "]"));
|
||
this.put("Sqlite", new f("\""));
|
||
}
|
||
};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.extensions.ExtensionPointName
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.EditorTextField
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.b;
|
||
|
||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.EditorTextField;
|
||
|
||
public interface a {
|
||
public static final ExtensionPointName<a> a = ExtensionPointName.create((String)"com.bruce.mybatisCodeHelper.controllerEditorProvider");
|
||
|
||
public EditorTextField a(Project var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.EditorSettings
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.editor.highlighter.EditorHighlighterFactory
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.fileTypes.FileTypeManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.testFramework.LightVirtualFile
|
||
* com.intellij.ui.EditorTextField
|
||
* com.intellij.velocity.psi.files.VtlFileType
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.b.a;
|
||
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.EditorSettings;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.editor.highlighter.EditorHighlighterFactory;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.testFramework.LightVirtualFile;
|
||
import com.intellij.ui.EditorTextField;
|
||
import com.intellij.velocity.psi.files.VtlFileType;
|
||
|
||
public class a
|
||
implements com.ccnode.codegenerator.mybatisGenerator.b.a {
|
||
@Override
|
||
public EditorTextField a(Project project) {
|
||
String string = "hello.vm";
|
||
FileType fileType = FileTypeManager.getInstance().getFileTypeByFileName(string);
|
||
PsiFileFactory psiFileFactory = PsiFileFactory.getInstance((Project)project);
|
||
PsiFile psiFile = psiFileFactory.createFileFromText(string, fileType, (CharSequence)"", 0L, true);
|
||
Document document = PsiDocumentManager.getInstance((Project)project).getDocument(psiFile);
|
||
return new EditorTextField(this, document, project, (FileType)VtlFileType.INSTANCE, project){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_mybatisGenerator_b_a_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_b_a_a_a = a2;
|
||
this.var_com_intellij_openapi_project_Project_a = project2;
|
||
super(document, project, fileType);
|
||
}
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setOneLineMode(false);
|
||
editorEx.setHorizontalScrollbarVisible(true);
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
EditorSettings editorSettings = editorEx.getSettings();
|
||
editorSettings.setVirtualSpace(false);
|
||
editorSettings.setLineMarkerAreaShown(false);
|
||
editorSettings.setIndentGuidesShown(false);
|
||
editorSettings.setLineNumbersShown(true);
|
||
editorSettings.setFoldingOutlineShown(true);
|
||
editorSettings.setAdditionalColumnsCount(3);
|
||
editorSettings.setAdditionalLinesCount(3);
|
||
editorSettings.setCaretRowShown(false);
|
||
editorEx.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(this.var_com_intellij_openapi_project_Project_a, (VirtualFile)new LightVirtualFile("controller.vm")));
|
||
return editorEx;
|
||
}
|
||
};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.ide.fileTemplates.FileTemplateManager
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.EditorFactory
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.editor.highlighter.EditorHighlighterFactory
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.fileTypes.FileTypeManager
|
||
* com.intellij.openapi.fileTypes.PlainTextFileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogBuilder
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.ui.EditorTextField
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.IOUtils
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d.e;
|
||
import com.ccnode.codegenerator.mybatisGenerator.o;
|
||
import com.ccnode.codegenerator.mybatisGenerator.r;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.ide.fileTemplates.FileTemplateManager;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.EditorFactory;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.editor.highlighter.EditorHighlighterFactory;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||
import com.intellij.openapi.fileTypes.PlainTextFileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogBuilder;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.ui.EditorTextField;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.lang.reflect.Method;
|
||
import java.nio.charset.Charset;
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextArea;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.IOUtils;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class g
|
||
extends DialogWrapper {
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
public JButton b;
|
||
public JButton c;
|
||
public JButton d;
|
||
public JTextArea var_javax_swing_JTextArea_a;
|
||
public JButton e;
|
||
private o var_com_ccnode_codegenerator_mybatisGenerator_o_a;
|
||
private a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
private String var_java_lang_String_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
private ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
static final /* synthetic */ boolean var_boolean_a;
|
||
|
||
public g(String string, o o2, a a2, String string2, Project project, Profile profile, ProjectProfile projectProfile) {
|
||
super(project, true);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_o_a = o2;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
this.var_java_lang_String_a = string2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = profile;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
this.void_a();
|
||
this.var_com_intellij_ui_EditorTextField_a.setText(string);
|
||
String string3 = A.a("couldUseVariable");
|
||
this.var_javax_swing_JTextArea_a.setText(string3 + "\n\n#* @vtlvariable name=\"tableName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"entityPackageName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"entityClassName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"servicePackageName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"serviceInterfacePackage\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"serviceClassName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"serviceInterfaceClassName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"mapperPackageName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"mapperClassName\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"controllerPackage\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"tableRemark\" type=\"java.lang.String\" *#\n#* @vtlvariable name=\"myDate\" type=\"java.util.Date\" *#\n#* @vtlvariable name=\"simpleDateFormat\" type=\"java.text.SimpleDateFormat\" *#");
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
final /* synthetic */ o var_com_ccnode_codegenerator_mybatisGenerator_o_a;
|
||
final /* synthetic */ ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
final /* synthetic */ Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_mybatisGenerator_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a = g2;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_o_a = o2;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = profile;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string;
|
||
Object object;
|
||
HashMap<String, Object> hashMap = new HashMap<String, Object>();
|
||
String string2 = this.var_java_lang_String_a;
|
||
if (string2 == null) {
|
||
object = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.a();
|
||
string2 = string = object.get(0);
|
||
}
|
||
hashMap.put("tableName", string2);
|
||
hashMap.put("entityPackageName", this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_b());
|
||
object = u.a(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, string2, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
hashMap.put("entityClassName", object);
|
||
hashMap.put("mapperPackageName", this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_f());
|
||
hashMap.put("mapperClassName", (String)object + "Mapper");
|
||
string = "com.service";
|
||
hashMap.put("controllerPackage", this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_a());
|
||
if (this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_j() != null) {
|
||
string = this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_j();
|
||
}
|
||
hashMap.put("servicePackageName", string);
|
||
hashMap.put("tableRemark", this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.com_ccnode_codegenerator_mybatisGenerator_t_a(string2).b());
|
||
hashMap.put("serviceInterfacePackage", this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_l());
|
||
if (StringUtils.isBlank((CharSequence)this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.java_lang_String_l())) {
|
||
hashMap.put("serviceClassName", (String)object + "Service");
|
||
} else {
|
||
hashMap.put("serviceClassName", (String)object + "ServiceImpl");
|
||
hashMap.put("serviceInterfaceClassName", (String)object + "Service");
|
||
}
|
||
hashMap.put("myDate", new Date());
|
||
hashMap.put("simpleDateFormat", new SimpleDateFormat("yyyy-MM-dd"));
|
||
String string3 = com.ccnode.codegenerator.mybatisGenerator.d.e.a(this.var_com_ccnode_codegenerator_mybatisGenerator_g_a.var_com_intellij_ui_EditorTextField_a.getText(), hashMap);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a.a(string3, this.var_com_intellij_openapi_project_Project_a, ".java");
|
||
}
|
||
});
|
||
this.d.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_mybatisGenerator_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a = g2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
InputStream inputStream = r.class.getClassLoader().getResourceAsStream("templates/myController.vm");
|
||
try {
|
||
String string;
|
||
String string2 = string = IOUtils.toString((InputStream)inputStream, (Charset)Charsets.UTF_8);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a.a(string2.replace("\r\n", "\n"), this.var_com_intellij_openapi_project_Project_a, ".vm");
|
||
}
|
||
catch (IOException iOException) {
|
||
iOException.printStackTrace();
|
||
}
|
||
}
|
||
});
|
||
this.c.addActionListener(new ActionListener(){
|
||
final /* synthetic */ ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_mybatisGenerator_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a = g2;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a.var_com_intellij_ui_EditorTextField_a.setText(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getControllerTemplateString());
|
||
}
|
||
});
|
||
this.b.addActionListener(new ActionListener(){
|
||
final /* synthetic */ ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_mybatisGenerator_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_g_a = g2;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.setControllerTemplateString(this.var_com_ccnode_codegenerator_mybatisGenerator_g_a.var_com_intellij_ui_EditorTextField_a.getText());
|
||
}
|
||
});
|
||
this.e.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
BrowserUtil.browse((String)"https://github.com/gejun123456/MyBatisCodeHelper-Pro/tree/master/docs/controllers");
|
||
}
|
||
});
|
||
this.setTitle("Edit template for controller");
|
||
this.init();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.setControllerTemplateString(this.var_com_intellij_ui_EditorTextField_a.getText());
|
||
super.doOKAction();
|
||
}
|
||
|
||
private void a(String string, Project project, String string2) {
|
||
EditorFactory editorFactory = EditorFactory.getInstance();
|
||
PsiFileFactory psiFileFactory = PsiFileFactory.getInstance((Project)project);
|
||
String string3 = "xxx" + string2;
|
||
FileType fileType = FileTypeManager.getInstance().getFileTypeByFileName(string3);
|
||
PsiFile psiFile = psiFileFactory.createFileFromText(string3, fileType, (CharSequence)string, 0L, true);
|
||
psiFile.getViewProvider().putUserData(FileTemplateManager.DEFAULT_TEMPLATE_PROPERTIES, (Object)FileTemplateManager.getInstance((Project)project).getDefaultProperties());
|
||
Document document = PsiDocumentManager.getInstance((Project)project).getDocument(psiFile);
|
||
if (!var_boolean_a && document == null) {
|
||
throw new AssertionError();
|
||
}
|
||
Editor editor = editorFactory.createViewer(document, project);
|
||
com.ccnode.codegenerator.mybatisGenerator.d.a.a(editor);
|
||
((EditorEx)editor).setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(project, string3));
|
||
DialogBuilder dialogBuilder = new DialogBuilder(project);
|
||
dialogBuilder.setTitle("Template info");
|
||
JComponent jComponent = editor.getComponent();
|
||
jComponent.setPreferredSize(new Dimension(800, 600));
|
||
dialogBuilder.setCenterPanel(jComponent);
|
||
dialogBuilder.addCloseButton();
|
||
dialogBuilder.addDisposable(() -> {
|
||
editorFactory.releaseEditor(editor);
|
||
dialogBuilder.dispose();
|
||
});
|
||
dialogBuilder.show();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.b();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_ui_EditorTextField_a, "Center");
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 6, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, "South");
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "preview"));
|
||
jPanel.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, new Dimension(82, 30), null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel.add((Component)spacer, new GridConstraints(0, 5, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.b = new JButton();
|
||
this.a(this.b, this.a("i18n/i18n", "apply1"));
|
||
jPanel.add((Component)this.b, new GridConstraints(0, 4, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.c = new JButton();
|
||
this.a(this.c, this.a("i18n/i18n", "reset"));
|
||
jPanel.add((Component)this.c, new GridConstraints(0, 3, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.d = new JButton();
|
||
this.a(this.d, this.a("i18n/i18n", "show.default.template"));
|
||
jPanel.add((Component)this.d, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.e = new JButton();
|
||
this.a(this.e, this.a("i18n/i18n", "more.template"));
|
||
jPanel.add((Component)this.e, new GridConstraints(0, 2, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
this.var_javax_swing_JTextArea_a.setText("");
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JTextArea_a, "North");
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void b() {
|
||
com.ccnode.codegenerator.mybatisGenerator.b.a[] aArray = (com.ccnode.codegenerator.mybatisGenerator.b.a[])com.ccnode.codegenerator.mybatisGenerator.b.a.a.getExtensions();
|
||
this.var_com_intellij_ui_EditorTextField_a = aArray.length > 0 ? aArray[0].a(this.var_com_intellij_openapi_project_Project_a) : new EditorTextField("", this.var_com_intellij_openapi_project_Project_a, (FileType)PlainTextFileType.INSTANCE){
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setOneLineMode(false);
|
||
editorEx.setHorizontalScrollbarVisible(true);
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
return editorEx;
|
||
}
|
||
};
|
||
}
|
||
|
||
static {
|
||
var_boolean_a = !g.class.desiredAssertionStatus();
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.DialogWrapper$IdeModalityType
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.ui.EditorTextField
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.ui.EditorTextField;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class h
|
||
extends DialogWrapper {
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private String var_java_lang_String_a;
|
||
private String b;
|
||
private FileType var_com_intellij_openapi_fileTypes_FileType_a;
|
||
|
||
public h(Project project, String string, String string2, FileType fileType) {
|
||
super(project, true, DialogWrapper.IdeModalityType.PROJECT);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_a = string;
|
||
this.b = string2;
|
||
this.var_com_intellij_openapi_fileTypes_FileType_a = fileType;
|
||
this.b();
|
||
this.var_com_intellij_ui_EditorTextField_a.setText(string2);
|
||
this.setTitle("Preview");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
String string = this.b;
|
||
PsiFile psiFile = PsiFileFactory.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).createFileFromText(this.var_java_lang_String_a, this.var_com_intellij_openapi_fileTypes_FileType_a, (CharSequence)string);
|
||
Document document = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDocument(psiFile);
|
||
this.var_com_intellij_ui_EditorTextField_a = new EditorTextField(document, this.var_com_intellij_openapi_project_Project_a, this.var_com_intellij_openapi_fileTypes_FileType_a){
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
return editorEx;
|
||
}
|
||
};
|
||
this.var_com_intellij_ui_EditorTextField_a.setOneLineMode(false);
|
||
this.var_com_intellij_ui_EditorTextField_a.setAutoscrolls(true);
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_ui_EditorTextField_a, "Center");
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.vfs.VfsUtil
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiManager
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.search.PsiShortNamesCache
|
||
* com.intellij.psi.xml.XmlFile
|
||
* org.mybatis.generator.exception.ShellException
|
||
* org.mybatis.generator.internal.DefaultShellCallback
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d.b;
|
||
import com.ccnode.codegenerator.mybatisGenerator.o;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.vfs.VfsUtil;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiManager;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.search.PsiShortNamesCache;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import java.io.File;
|
||
import org.mybatis.generator.exception.ShellException;
|
||
import org.mybatis.generator.internal.DefaultShellCallback;
|
||
|
||
public class i
|
||
extends DefaultShellCallback {
|
||
public static final String var_java_lang_String_a = ".java";
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private String b;
|
||
private String c;
|
||
private o var_com_ccnode_codegenerator_mybatisGenerator_o_a;
|
||
|
||
public i(Project project, boolean bl, String string, o o2) {
|
||
super(bl);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.c = string;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_o_a = o2;
|
||
}
|
||
|
||
public boolean isMergeSupported() {
|
||
return true;
|
||
}
|
||
|
||
public String mergeJavaFile(String string, File file, String[] stringArray, String string2) throws ShellException {
|
||
if (file == null) {
|
||
return string;
|
||
}
|
||
String string3 = file.getPath();
|
||
File file2 = new File(string3);
|
||
if (!file2.exists()) {
|
||
return string;
|
||
}
|
||
String string4 = string3.replaceAll("\\\\", "/");
|
||
String[] stringArray2 = string4.split("/");
|
||
if (stringArray2.length == 0) {
|
||
return string;
|
||
}
|
||
String string5 = stringArray2[stringArray2.length - 1];
|
||
if (!string5.endsWith(var_java_lang_String_a)) {
|
||
return string;
|
||
}
|
||
String string6 = string5.substring(0, string5.length() - var_java_lang_String_a.length());
|
||
PsiClass[] psiClassArray = PsiShortNamesCache.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getClassesByName(string6, GlobalSearchScope.projectScope((Project)this.var_com_intellij_openapi_project_Project_a));
|
||
if (psiClassArray.length == 0) {
|
||
return string;
|
||
}
|
||
PsiClass psiClass = null;
|
||
for (PsiClass psiClass2 : psiClassArray) {
|
||
String string7 = psiClass2.getQualifiedName();
|
||
if (string7 == null) continue;
|
||
PsiFile psiFile = psiClass2.getContainingFile();
|
||
VirtualFile virtualFile = psiFile.getVirtualFile();
|
||
VirtualFile virtualFile2 = VfsUtil.findFileByIoFile((File)file, (boolean)true);
|
||
if (virtualFile == null || virtualFile2 == null || !virtualFile.getPath().equals(virtualFile2.getPath())) continue;
|
||
psiClass = psiClass2;
|
||
}
|
||
if (psiClass == null) {
|
||
return string;
|
||
}
|
||
if (psiClass.isInterface()) {
|
||
this.b = string3;
|
||
return com.ccnode.codegenerator.mybatisGenerator.d.b.java_lang_String_a(string, psiClass, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
if (this.c != null && this.c.equals(string6)) {
|
||
return com.ccnode.codegenerator.mybatisGenerator.d.b.c(string, psiClass, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
return string;
|
||
}
|
||
|
||
private boolean a(String string, String string2) {
|
||
String string3 = string.replace(".", "/");
|
||
return string2.contains(string3 + var_java_lang_String_a);
|
||
}
|
||
|
||
public String a() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public boolean isMergeXmlFile() {
|
||
boolean bl = e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a).getXmlAutoMerge();
|
||
return !bl;
|
||
}
|
||
|
||
public String mergeXmlFile(String string, File file, String[] stringArray) throws ShellException {
|
||
File file2 = file;
|
||
VirtualFile virtualFile = VfsUtil.findFileByIoFile((File)file2, (boolean)true);
|
||
PsiFile psiFile = PsiManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).findFile(virtualFile);
|
||
if (psiFile == null) {
|
||
throw new RuntimeException("file not exist" + file2.getAbsolutePath());
|
||
}
|
||
if (psiFile instanceof XmlFile) {
|
||
return com.ccnode.codegenerator.mybatisGenerator.d.b.a(string, (XmlFile)psiFile, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
throw new RuntimeException("file is not xml file, file path is:" + file.getAbsolutePath());
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.codeInsight.completion.CompletionResultSet
|
||
* com.intellij.codeInsight.completion.PlainPrefixMatcher
|
||
* com.intellij.codeInsight.completion.PrefixMatcher
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* com.intellij.util.TextFieldCompletionProvider
|
||
* com.intellij.util.textCompletion.TextCompletionProvider
|
||
* com.intellij.util.textCompletion.TextFieldWithCompletion
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.ag.b.f;
|
||
import com.intellij.codeInsight.completion.CompletionResultSet;
|
||
import com.intellij.codeInsight.completion.PlainPrefixMatcher;
|
||
import com.intellij.codeInsight.completion.PrefixMatcher;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import com.intellij.util.TextFieldCompletionProvider;
|
||
import com.intellij.util.textCompletion.TextCompletionProvider;
|
||
import com.intellij.util.textCompletion.TextFieldWithCompletion;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.List;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class j
|
||
extends DialogWrapper {
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private final List<String> var_java_util_List_java_lang_String__a;
|
||
private String var_java_lang_String_a;
|
||
private TextFieldWithCompletion var_com_intellij_util_textCompletion_TextFieldWithCompletion_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private String b;
|
||
|
||
public j(Project project, List<String> list, String string) {
|
||
super(project, true);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_openapi_project_Project_a = list;
|
||
this.var_java_lang_String_a = string;
|
||
this.b();
|
||
this.var_com_intellij_util_textCompletion_TextFieldWithCompletion_a.setText(string);
|
||
this.setTitle("Method name for sql");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_com_intellij_util_textCompletion_TextFieldWithCompletion_a = new TextFieldWithCompletion(this.var_com_intellij_openapi_project_Project_a, (TextCompletionProvider)new TextFieldCompletionProvider(){
|
||
|
||
protected void addCompletionVariants(@NotNull String string, int n2, @NotNull String string2, @NotNull CompletionResultSet completionResultSet) {
|
||
CompletionResultSet completionResultSet2 = completionResultSet.withPrefixMatcher((PrefixMatcher)new PlainPrefixMatcher(string2.trim()));
|
||
f.var_com_ccnode_codegenerator_ag_b_f$a_a.a((List<String>)j.this.var_com_intellij_openapi_project_Project_a, completionResultSet2, string2.trim());
|
||
}
|
||
}, "", true, true, true);
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.b = this.var_com_intellij_util_textCompletion_TextFieldWithCompletion_a.getText().trim();
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
if (StringUtils.isBlank((CharSequence)this.var_com_intellij_util_textCompletion_TextFieldWithCompletion_a.getText())) {
|
||
return new ValidationInfo("method name should not be blank", (JComponent)this.var_com_intellij_util_textCompletion_TextFieldWithCompletion_a);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_util_textCompletion_TextFieldWithCompletion_a, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel.add((Component)spacer, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.database.model.DasObject
|
||
* com.intellij.database.psi.DbDataSource
|
||
* com.intellij.database.psi.DbTable
|
||
* com.intellij.database.util.DasUtil
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.LangDataKeys
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.c;
|
||
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.mybatisGenerator.c.b;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.database.model.DasObject;
|
||
import com.intellij.database.psi.DbDataSource;
|
||
import com.intellij.database.psi.DbTable;
|
||
import com.intellij.database.util.DasUtil;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.LangDataKeys;
|
||
import com.intellij.psi.PsiElement;
|
||
import java.util.ArrayList;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class a
|
||
extends com.ccnode.codegenerator.a.a {
|
||
public a() {
|
||
super(p.a());
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
Object object;
|
||
PsiElement psiElement2;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
PsiElement[] psiElementArray = (PsiElement[])anActionEvent.getData(LangDataKeys.PSI_ELEMENT_ARRAY);
|
||
ArrayList<DbTable> arrayList2 = new ArrayList<DbTable>();
|
||
for (PsiElement psiElement2 : psiElementArray) {
|
||
if (!(psiElement2 instanceof DbTable)) continue;
|
||
object = (DbTable)psiElement2;
|
||
arrayList2.add((DbTable)object);
|
||
arrayList.add(object.getName());
|
||
}
|
||
boolean bl = com.ccnode.codegenerator.ah.a.a.a(anActionEvent.getProject());
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
DbTable dbTable = (DbTable)arrayList2.get(0);
|
||
String string = DasUtil.getSchema((DasObject)dbTable);
|
||
psiElement2 = dbTable.getDataSource();
|
||
object = new com.ccnode.codegenerator.mybatisGenerator.a.a.a((DbDataSource)psiElement2, string);
|
||
b b2 = new b(anActionEvent.getProject(), (com.ccnode.codegenerator.mybatisGenerator.a.a)object, arrayList);
|
||
b2.showAndGet();
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
PsiElement psiElement = (PsiElement)anActionEvent.getData(LangDataKeys.PSI_ELEMENT);
|
||
if (psiElement instanceof DbTable) {
|
||
anActionEvent.getPresentation().setVisible(true);
|
||
return;
|
||
}
|
||
PsiElement[] psiElementArray = (PsiElement[])anActionEvent.getData(LangDataKeys.PSI_ELEMENT_ARRAY);
|
||
if (psiElementArray != null) {
|
||
for (PsiElement psiElement2 : psiElementArray) {
|
||
if (!(psiElement2 instanceof DbTable)) continue;
|
||
anActionEvent.getPresentation().setEnabledAndVisible(true);
|
||
return;
|
||
}
|
||
}
|
||
anActionEvent.getPresentation().setEnabledAndVisible(false);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.fileEditor.FileDocumentManager
|
||
* com.intellij.openapi.options.ShowSettingsUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.openapi.vfs.VirtualFileManager
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
* org.mybatis.generator.exception.InvalidConfigurationException
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.c;
|
||
|
||
import com.ccnode.codegenerator.F.c;
|
||
import com.ccnode.codegenerator.ad.i;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseConnector;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.TableInfoFromDatabaseConnection;
|
||
import com.ccnode.codegenerator.i.b_0;
|
||
import com.ccnode.codegenerator.mybatisGenerator.o;
|
||
import com.ccnode.codegenerator.mybatisGenerator.r;
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.mybatisGenerator.y;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.myconfigurable.TableGenerateConfig;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||
import com.intellij.openapi.options.ShowSettingsUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.awt.event.MouseAdapter;
|
||
import java.awt.event.MouseEvent;
|
||
import java.io.IOException;
|
||
import java.lang.reflect.Method;
|
||
import java.sql.SQLException;
|
||
import java.util.ArrayList;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import java.util.ResourceBundle;
|
||
import java.util.Set;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.BoxLayout;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
import org.mybatis.generator.exception.InvalidConfigurationException;
|
||
|
||
public class b
|
||
extends DialogWrapper {
|
||
private JPanel var_javax_swing_JPanel_a = Lists.newArrayList();
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private JPanel d;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JButton var_javax_swing_JButton_b;
|
||
private JButton var_javax_swing_JButton_c;
|
||
private JPanel e;
|
||
private LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_a;
|
||
private Set<String> var_java_util_Set_java_lang_String__a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static com.ccnode.codegenerator.F.a var_com_ccnode_codegenerator_F_a_a;
|
||
private ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
private Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
private com.ccnode.codegenerator.mybatisGenerator.a.a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
private List<String> var_java_util_List_java_lang_String__b;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public b(Project project, com.ccnode.codegenerator.mybatisGenerator.a.a a2, List<String> list) {
|
||
super(project, true);
|
||
this.setTitle("run mybatis generator for current database");
|
||
this.var_javax_swing_JPanel_b = list;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.getRootPane().setDefaultButton(null);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(project);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
this.var_javax_swing_JPanel_a = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.a();
|
||
this.b();
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ b var_com_ccnode_codegenerator_mybatisGenerator_c_b_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a = b2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
ShowSettingsUtil.getInstance().showSettingsDialog(this.var_com_intellij_openapi_project_Project_a, b_0.class);
|
||
}
|
||
}, null);
|
||
this.var_javax_swing_JCheckBox_a.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getUseActualColumnNames());
|
||
this.init();
|
||
}
|
||
|
||
@Nullable
|
||
private TableInfoFromDatabaseConnection a(NewDatabaseInfo newDatabaseInfo, String string, Project project, boolean bl) {
|
||
TableInfoFromDatabaseConnection tableInfoFromDatabaseConnection;
|
||
try {
|
||
tableInfoFromDatabaseConnection = DatabaseConnector.INSTANCE.getTableInfoFromConnection(newDatabaseInfo, string, bl);
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)project, (String)("extract columns from table catch exception, the exception is " + i.var_com_ccnode_codegenerator_ad_i_a.a(exception)), (String)"extract columns error");
|
||
return null;
|
||
}
|
||
return tableInfoFromDatabaseConnection;
|
||
}
|
||
|
||
private void void_a() {
|
||
r r2;
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a == null) {
|
||
System.out.println("myProject profile is null");
|
||
}
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2 = new r(this.var_com_intellij_openapi_project_Project_a, true, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a, null, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a, Lists.newArrayList(), null);
|
||
this.e = r2.javax_swing_JPanel_a();
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.setBorder(BorderFactory.createTitledBorder(null, "", 0, 0, null, null));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 2, 1, 1, 1, 1, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(1, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "modelnameremoveprechar"));
|
||
jPanel2.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_a, this.a("i18n/i18n", "removetableprename"));
|
||
jPanel2.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(0, 1, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "table.name.tbl.hello.will.generate.model.name.tblhello.if.we.want.change.it.to.hello.could.set.remove.table.pre.name.to.tbl"));
|
||
jPanel.add((Component)jLabel2, new GridConstraints(0, 0, 1, 2, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel.add((Component)jScrollPane, new GridConstraints(2, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setViewportView(this.e);
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_a.setText("useAcutalColumName");
|
||
jPanel.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(3, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.d = new JPanel();
|
||
this.d.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.d, new GridConstraints(0, 0, 2, 1, 0, 3, 3, 3, new Dimension(200, -1), null, null, 0, false));
|
||
this.d.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "alltables"), 0, 0, null, null));
|
||
JScrollPane jScrollPane2 = new JScrollPane();
|
||
this.d.add((Component)jScrollPane2, new GridConstraints(1, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jScrollPane2.setViewportView(this.var_javax_swing_JPanel_b);
|
||
this.var_javax_swing_JPanel_b.setBorder(BorderFactory.createTitledBorder(null, "", 0, 0, null, null));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.d.add((Component)jPanel3, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "addall"));
|
||
jPanel3.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.a(this.var_javax_swing_JButton_b, this.a("i18n/i18n", "addbyregex"));
|
||
jPanel3.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel4, new GridConstraints(0, 1, 2, 1, 0, 3, 3, 3, new Dimension(200, -1), null, null, 0, false));
|
||
jPanel4.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "selectdtables"), 0, 0, null, null));
|
||
JScrollPane jScrollPane3 = new JScrollPane();
|
||
jPanel4.add((Component)jScrollPane3, new GridConstraints(1, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jScrollPane3.setViewportView(this.var_javax_swing_JPanel_c);
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel4.add((Component)jPanel5, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.a(this.var_javax_swing_JButton_c, this.a("i18n/i18n", "clearall"));
|
||
jPanel5.add((Component)this.var_javax_swing_JButton_c, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel5.add((Component)spacer, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
JLabel jLabel;
|
||
String string;
|
||
this.var_javax_swing_JPanel_b.setLayout(new BoxLayout(this.var_javax_swing_JPanel_b, 1));
|
||
Iterator iterator = this.var_javax_swing_JPanel_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
string = (String)iterator.next();
|
||
if (this.var_javax_swing_JPanel_b.contains(string)) continue;
|
||
jLabel = new JLabel(string);
|
||
jLabel.addMouseListener(new a(this, jLabel));
|
||
this.var_javax_swing_JPanel_b.add(jLabel);
|
||
}
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
for (JLabel jLabel : b.this.a(b.this.var_javax_swing_JPanel_b)) {
|
||
b.this.a(jLabel);
|
||
}
|
||
b.this.c();
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = Messages.showInputDialog((Project)b.this.var_com_intellij_openapi_project_Project_a, (String)"enter regex to match the table", (String)"Add table by regex", null);
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
try {
|
||
for (JLabel jLabel : b.this.a(b.this.var_javax_swing_JPanel_b)) {
|
||
boolean bl = jLabel.getText().matches(string);
|
||
if (!bl) continue;
|
||
b.this.a(jLabel);
|
||
}
|
||
b.this.c();
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)b.this.var_com_intellij_openapi_project_Project_a, (String)" regex not right", (String)"Error");
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_c.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
for (JLabel jLabel : b.this.a(b.this.var_javax_swing_JPanel_c)) {
|
||
b.this.b(jLabel);
|
||
}
|
||
b.this.c();
|
||
}
|
||
});
|
||
this.var_javax_swing_JPanel_c.setLayout(new BoxLayout(this.var_javax_swing_JPanel_c, 1));
|
||
iterator = this.var_javax_swing_JPanel_b.iterator();
|
||
while (iterator.hasNext()) {
|
||
string = (String)iterator.next();
|
||
jLabel = new JLabel(string);
|
||
jLabel.addMouseListener(new b(this, jLabel));
|
||
this.var_javax_swing_JPanel_c.add(jLabel);
|
||
}
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void a(JLabel jLabel) {
|
||
this.var_javax_swing_JPanel_b.remove(jLabel);
|
||
JLabel jLabel2 = new JLabel(jLabel.getText());
|
||
jLabel2.addMouseListener(new b(this, jLabel2));
|
||
this.var_javax_swing_JPanel_c.add(jLabel2);
|
||
}
|
||
|
||
private void b(JLabel jLabel) {
|
||
this.var_javax_swing_JPanel_c.remove(jLabel);
|
||
JLabel jLabel2 = new JLabel(jLabel.getText());
|
||
jLabel2.addMouseListener(new a(this, jLabel2));
|
||
this.var_javax_swing_JPanel_b.add(jLabel2);
|
||
}
|
||
|
||
private void c() {
|
||
this.var_javax_swing_JPanel_c.revalidate();
|
||
this.var_javax_swing_JPanel_c.repaint();
|
||
this.var_javax_swing_JPanel_b.revalidate();
|
||
this.var_javax_swing_JPanel_b.repaint();
|
||
}
|
||
|
||
List<JLabel> a(JPanel jPanel) {
|
||
Component[] componentArray;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (Component component : componentArray = jPanel.getComponents()) {
|
||
if (!(component instanceof JLabel)) continue;
|
||
arrayList.add((JLabel)component);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
FileDocumentManager.getInstance().saveAllDocuments();
|
||
if (!com.ccnode.codegenerator.ah.a.a.a(this.var_com_intellij_openapi_project_Project_a)) {
|
||
return;
|
||
}
|
||
if (!this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.boolean_a()) {
|
||
return;
|
||
}
|
||
String string = "";
|
||
try {
|
||
string = this.java_lang_String_a();
|
||
}
|
||
catch (InvalidConfigurationException invalidConfigurationException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a((Exception)((Object)invalidConfigurationException)), (String)"error");
|
||
return;
|
||
}
|
||
catch (InterruptedException interruptedException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(interruptedException), (String)"error");
|
||
return;
|
||
}
|
||
catch (SQLException sQLException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(sQLException), (String)"error");
|
||
return;
|
||
}
|
||
catch (IOException iOException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(iOException), (String)"error");
|
||
return;
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(exception), (String)"error");
|
||
return;
|
||
}
|
||
VirtualFileManager.getInstance().syncRefresh();
|
||
Messages.showMessageDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)string, (String)"success", (Icon)Messages.getInformationIcon());
|
||
super.doOKAction();
|
||
}
|
||
|
||
private String java_lang_String_a() throws InvalidConfigurationException, InterruptedException, SQLException, IOException, Exception {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
List<JLabel> list = this.a(this.var_javax_swing_JPanel_c);
|
||
for (JLabel object2 : list) {
|
||
this.var_javax_swing_JPanel_a.add(object2.getText());
|
||
}
|
||
NewDatabaseInfo newDatabaseInfo = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a();
|
||
String string = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.b();
|
||
Object object = this.var_javax_swing_JPanel_a.iterator();
|
||
while (object.hasNext()) {
|
||
String string2 = (String)object.next();
|
||
IntellijTableInfo intellijTableInfo = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.org_mybatis_generator_api_IntellijTableInfo_a(string2);
|
||
t t2 = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.com_ccnode_codegenerator_mybatisGenerator_t_a(string2);
|
||
String string3 = u.a(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, string2, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
TableGenerateConfig tableGenerateConfig = u.a(string2, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, string);
|
||
tableGenerateConfig.setUseActualColumnName(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
List<com.ccnode.codegenerator.mybatisGenerator.a> list2 = y.a(t2.b(), tableGenerateConfig.getUseActualColumnName());
|
||
List<com.ccnode.codegenerator.mybatisGenerator.a> list3 = y.a(list2, tableGenerateConfig, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
com.ccnode.codegenerator.mybatisGenerator.b b2 = y.a(list2, list3, com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a());
|
||
tableGenerateConfig.setColumnOverrideList(b2.a());
|
||
tableGenerateConfig.setIgnoredColums(b2.b());
|
||
o o2 = this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_ccnode_codegenerator_mybatisGenerator_o_a();
|
||
o2.p(t2.a());
|
||
List<String> list4 = null;
|
||
try {
|
||
list4 = u.a(this.var_com_intellij_openapi_project_Project_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a, tableGenerateConfig, string2, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, o2, string3, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
}
|
||
catch (Exception exception) {
|
||
throw new RuntimeException(exception);
|
||
}
|
||
if (list4.isEmpty()) continue;
|
||
stringBuilder.append(Joiner.on((String)"\n").join(list4));
|
||
}
|
||
object = stringBuilder.toString();
|
||
if (StringUtils.isBlank((String)object)) {
|
||
return "success";
|
||
}
|
||
return object;
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
return this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_intellij_openapi_ui_ValidationInfo_a();
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_F_a_a = com.ccnode.codegenerator.F.c.var_com_ccnode_codegenerator_F_c_a.a(b.class);
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
|
||
class a
|
||
extends MouseAdapter {
|
||
private JLabel var_javax_swing_JLabel_a;
|
||
final /* synthetic */ b var_com_ccnode_codegenerator_mybatisGenerator_c_b_a;
|
||
|
||
public a(b b2, JLabel jLabel) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a = b2;
|
||
this.var_javax_swing_JLabel_a = jLabel;
|
||
}
|
||
|
||
@Override
|
||
public void mouseClicked(MouseEvent mouseEvent) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a.a(this.var_javax_swing_JLabel_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a.c();
|
||
}
|
||
}
|
||
|
||
class b
|
||
extends MouseAdapter {
|
||
private JLabel var_javax_swing_JLabel_a;
|
||
final /* synthetic */ b var_com_ccnode_codegenerator_mybatisGenerator_c_b_a;
|
||
|
||
public b(b b2, JLabel jLabel) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a = b2;
|
||
this.var_javax_swing_JLabel_a = jLabel;
|
||
}
|
||
|
||
@Override
|
||
public void mouseClicked(MouseEvent mouseEvent) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a.b(this.var_javax_swing_JLabel_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_c_b_a.c();
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.AddEditDeleteListPanel
|
||
* com.intellij.ui.ListSpeedSearch
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.j;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.AddEditDeleteListPanel;
|
||
import com.intellij.ui.ListSpeedSearch;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import javax.swing.JList;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class k
|
||
extends AddEditDeleteListPanel<String> {
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
|
||
public k(String string, Project project, List<String> list, List<String> list2) {
|
||
super(string, list2);
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_openapi_project_Project_a = list;
|
||
new ListSpeedSearch((JList)this.myList);
|
||
}
|
||
|
||
public List<String> a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_com_intellij_openapi_project_Project_a = list;
|
||
}
|
||
|
||
@Nullable
|
||
protected String a() {
|
||
return this.a("", "Add Value");
|
||
}
|
||
|
||
@Nullable
|
||
private String a(String string, String string2) {
|
||
j j2 = new j(this.var_com_intellij_openapi_project_Project_a, (List<String>)this.var_com_intellij_openapi_project_Project_a, string);
|
||
boolean bl = j2.showAndGet();
|
||
if (bl) {
|
||
return j2.java_lang_String_a();
|
||
}
|
||
return string;
|
||
}
|
||
|
||
public void b(List<String> list) {
|
||
this.myListModel.clear();
|
||
list.stream().sorted(String.CASE_INSENSITIVE_ORDER).forEach(this.myListModel::addElement);
|
||
}
|
||
|
||
public List<String> b() {
|
||
Object[] objectArray;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (Object object : objectArray = this.getListItems()) {
|
||
arrayList.add((String)object);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
void c(List<String> list) {
|
||
list.clear();
|
||
for (Object object : this.getListItems()) {
|
||
list.add((String)object);
|
||
}
|
||
}
|
||
|
||
public void void_a(String string) {
|
||
this.addElement(string);
|
||
}
|
||
|
||
protected String java_lang_String_a(String string) {
|
||
return this.a(string, "Edit Value");
|
||
}
|
||
|
||
protected /* synthetic */ Object editSelectedItem(Object object) {
|
||
return this.java_lang_String_a((String)object);
|
||
}
|
||
|
||
@Nullable
|
||
protected /* synthetic */ Object findItemToAdd() {
|
||
return this.a();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import java.util.List;
|
||
|
||
public class o {
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private String var_java_lang_String_c;
|
||
private boolean var_boolean_a;
|
||
private boolean var_boolean_b;
|
||
private String var_java_lang_String_d;
|
||
private String var_java_lang_String_e;
|
||
private String var_java_lang_String_f;
|
||
private String var_java_lang_String_g;
|
||
private String var_java_lang_String_h;
|
||
private boolean var_boolean_c;
|
||
private boolean var_boolean_d;
|
||
private boolean var_boolean_e;
|
||
private boolean var_boolean_f;
|
||
private boolean var_boolean_g;
|
||
private boolean var_boolean_h;
|
||
private boolean var_boolean_i;
|
||
private boolean var_boolean_j;
|
||
private boolean var_boolean_k;
|
||
private String var_java_lang_String_i;
|
||
private String var_java_lang_String_j;
|
||
private boolean var_boolean_l;
|
||
private boolean var_boolean_m;
|
||
private boolean var_boolean_n;
|
||
private boolean var_boolean_o;
|
||
private boolean var_boolean_p;
|
||
private boolean var_boolean_q;
|
||
private boolean var_boolean_r;
|
||
private String var_java_lang_String_k;
|
||
private boolean var_boolean_s;
|
||
private boolean var_boolean_t;
|
||
private String var_java_lang_String_l;
|
||
private String var_java_lang_String_m;
|
||
private String var_java_lang_String_n;
|
||
private boolean var_boolean_u;
|
||
private String var_java_lang_String_o;
|
||
private String var_java_lang_String_p;
|
||
private boolean var_boolean_v;
|
||
private String var_java_lang_String_q;
|
||
private String var_java_lang_String_r;
|
||
private boolean var_boolean_w;
|
||
private boolean var_boolean_x;
|
||
private boolean var_boolean_y;
|
||
private boolean var_boolean_z;
|
||
private boolean var_boolean_A;
|
||
private boolean var_boolean_B;
|
||
private boolean var_boolean_C;
|
||
private boolean var_boolean_D;
|
||
private boolean var_boolean_E;
|
||
private boolean F;
|
||
private boolean G;
|
||
private String var_java_lang_String_s;
|
||
private String var_java_lang_String_t;
|
||
private boolean H;
|
||
private boolean I;
|
||
private boolean J;
|
||
private boolean K;
|
||
private boolean L;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private List<String> var_java_util_List_java_lang_String__b;
|
||
private String var_java_lang_String_u;
|
||
private boolean M = false;
|
||
private boolean N = false;
|
||
private String var_java_lang_String_v = "";
|
||
private String var_java_lang_String_w = "";
|
||
private String var_java_lang_String_x = "";
|
||
private String var_java_lang_String_y;
|
||
private String var_java_lang_String_z;
|
||
private boolean O = false;
|
||
private boolean P = false;
|
||
private boolean Q = false;
|
||
private String var_java_lang_String_A;
|
||
private String var_java_lang_String_B;
|
||
private boolean R = false;
|
||
private boolean S = false;
|
||
private String var_java_lang_String_C = "";
|
||
private String var_java_lang_String_D;
|
||
private String var_java_lang_String_E;
|
||
private boolean T;
|
||
private boolean U;
|
||
private boolean V;
|
||
private boolean W;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_x;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_x = string;
|
||
}
|
||
|
||
public List<String> a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_java_lang_String_a = list;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public String java_lang_String_b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.var_java_lang_String_c = string;
|
||
}
|
||
|
||
public String java_lang_String_c() {
|
||
return this.var_java_lang_String_c;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.var_java_lang_String_d = string;
|
||
}
|
||
|
||
public String java_lang_String_d() {
|
||
return this.var_java_lang_String_d;
|
||
}
|
||
|
||
public void e(String string) {
|
||
this.var_java_lang_String_e = string;
|
||
}
|
||
|
||
public String java_lang_String_e() {
|
||
return this.var_java_lang_String_e;
|
||
}
|
||
|
||
public void f(String string) {
|
||
this.var_java_lang_String_f = string;
|
||
}
|
||
|
||
public String java_lang_String_f() {
|
||
return this.var_java_lang_String_f;
|
||
}
|
||
|
||
public void g(String string) {
|
||
this.var_java_lang_String_g = string;
|
||
}
|
||
|
||
public String java_lang_String_g() {
|
||
return this.var_java_lang_String_g;
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.var_boolean_d = bl;
|
||
}
|
||
|
||
public boolean boolean_b() {
|
||
return this.var_boolean_d;
|
||
}
|
||
|
||
public void c(boolean bl) {
|
||
this.var_boolean_e = bl;
|
||
}
|
||
|
||
public boolean boolean_c() {
|
||
return this.var_boolean_e;
|
||
}
|
||
|
||
public void d(boolean bl) {
|
||
this.var_boolean_f = bl;
|
||
}
|
||
|
||
public boolean boolean_d() {
|
||
return this.var_boolean_f;
|
||
}
|
||
|
||
public void e(boolean bl) {
|
||
this.var_boolean_g = bl;
|
||
}
|
||
|
||
public boolean boolean_e() {
|
||
return this.var_boolean_g;
|
||
}
|
||
|
||
public void f(boolean bl) {
|
||
this.var_boolean_j = bl;
|
||
}
|
||
|
||
public boolean boolean_f() {
|
||
return this.var_boolean_j;
|
||
}
|
||
|
||
public void g(boolean bl) {
|
||
this.var_boolean_k = bl;
|
||
}
|
||
|
||
public boolean boolean_g() {
|
||
return this.var_boolean_k;
|
||
}
|
||
|
||
public void h(boolean bl) {
|
||
this.var_boolean_l = bl;
|
||
}
|
||
|
||
public boolean boolean_h() {
|
||
return this.var_boolean_l;
|
||
}
|
||
|
||
public void i(boolean bl) {
|
||
this.var_boolean_m = bl;
|
||
}
|
||
|
||
public boolean boolean_i() {
|
||
return this.var_boolean_m;
|
||
}
|
||
|
||
public void j(boolean bl) {
|
||
this.var_boolean_o = bl;
|
||
}
|
||
|
||
public boolean boolean_j() {
|
||
return this.var_boolean_o;
|
||
}
|
||
|
||
public void k(boolean bl) {
|
||
this.var_boolean_p = bl;
|
||
}
|
||
|
||
public boolean boolean_k() {
|
||
return this.var_boolean_p;
|
||
}
|
||
|
||
public void l(boolean bl) {
|
||
this.var_boolean_q = bl;
|
||
}
|
||
|
||
public boolean boolean_l() {
|
||
return this.var_boolean_q;
|
||
}
|
||
|
||
public void m(boolean bl) {
|
||
this.var_boolean_r = bl;
|
||
}
|
||
|
||
public boolean boolean_m() {
|
||
return this.var_boolean_r;
|
||
}
|
||
|
||
public void h(String string) {
|
||
this.var_java_lang_String_k = string;
|
||
}
|
||
|
||
public String java_lang_String_h() {
|
||
return this.var_java_lang_String_k;
|
||
}
|
||
|
||
public void n(boolean bl) {
|
||
this.var_boolean_s = bl;
|
||
}
|
||
|
||
public boolean boolean_n() {
|
||
return this.var_boolean_s;
|
||
}
|
||
|
||
public void o(boolean bl) {
|
||
this.var_boolean_t = bl;
|
||
}
|
||
|
||
public boolean boolean_o() {
|
||
return this.var_boolean_t;
|
||
}
|
||
|
||
public void i(String string) {
|
||
this.var_java_lang_String_l = string;
|
||
}
|
||
|
||
public String java_lang_String_i() {
|
||
return this.var_java_lang_String_l;
|
||
}
|
||
|
||
public void j(String string) {
|
||
this.var_java_lang_String_m = string;
|
||
}
|
||
|
||
public String java_lang_String_j() {
|
||
return this.var_java_lang_String_m;
|
||
}
|
||
|
||
public void k(String string) {
|
||
this.var_java_lang_String_n = string;
|
||
}
|
||
|
||
public String java_lang_String_k() {
|
||
return this.var_java_lang_String_n;
|
||
}
|
||
|
||
public void p(boolean bl) {
|
||
this.var_boolean_u = bl;
|
||
}
|
||
|
||
public boolean boolean_p() {
|
||
return this.var_boolean_u;
|
||
}
|
||
|
||
public void l(String string) {
|
||
this.var_java_lang_String_o = string;
|
||
}
|
||
|
||
public String java_lang_String_l() {
|
||
return this.var_java_lang_String_o;
|
||
}
|
||
|
||
public void m(String string) {
|
||
this.var_java_lang_String_p = string;
|
||
}
|
||
|
||
public String java_lang_String_m() {
|
||
return this.var_java_lang_String_p;
|
||
}
|
||
|
||
public void q(boolean bl) {
|
||
this.var_boolean_v = bl;
|
||
}
|
||
|
||
public boolean boolean_q() {
|
||
return this.var_boolean_v;
|
||
}
|
||
|
||
public void n(String string) {
|
||
this.var_java_lang_String_q = string;
|
||
}
|
||
|
||
public String java_lang_String_n() {
|
||
return this.var_java_lang_String_q;
|
||
}
|
||
|
||
public void o(String string) {
|
||
this.var_java_lang_String_r = string;
|
||
}
|
||
|
||
public String java_lang_String_o() {
|
||
return this.var_java_lang_String_r;
|
||
}
|
||
|
||
public void r(boolean bl) {
|
||
this.var_boolean_w = bl;
|
||
}
|
||
|
||
public boolean boolean_r() {
|
||
return this.var_boolean_w;
|
||
}
|
||
|
||
public void s(boolean bl) {
|
||
this.var_boolean_x = bl;
|
||
}
|
||
|
||
public boolean boolean_s() {
|
||
return this.var_boolean_x;
|
||
}
|
||
|
||
public void t(boolean bl) {
|
||
this.var_boolean_y = bl;
|
||
}
|
||
|
||
public boolean boolean_t() {
|
||
return this.var_boolean_y;
|
||
}
|
||
|
||
public void u(boolean bl) {
|
||
this.var_boolean_z = bl;
|
||
}
|
||
|
||
public boolean boolean_u() {
|
||
return this.var_boolean_z;
|
||
}
|
||
|
||
public boolean boolean_v() {
|
||
return this.var_boolean_n;
|
||
}
|
||
|
||
public void v(boolean bl) {
|
||
this.var_boolean_n = bl;
|
||
}
|
||
|
||
public void w(boolean bl) {
|
||
this.var_boolean_A = bl;
|
||
}
|
||
|
||
public boolean boolean_w() {
|
||
return this.var_boolean_A;
|
||
}
|
||
|
||
public void x(boolean bl) {
|
||
this.var_boolean_B = bl;
|
||
}
|
||
|
||
public boolean boolean_x() {
|
||
return this.var_boolean_B;
|
||
}
|
||
|
||
public void y(boolean bl) {
|
||
this.var_boolean_C = bl;
|
||
}
|
||
|
||
public boolean boolean_y() {
|
||
return this.var_boolean_C;
|
||
}
|
||
|
||
public void z(boolean bl) {
|
||
this.var_boolean_D = bl;
|
||
}
|
||
|
||
public boolean boolean_z() {
|
||
return this.var_boolean_D;
|
||
}
|
||
|
||
public void A(boolean bl) {
|
||
this.var_boolean_E = bl;
|
||
}
|
||
|
||
public boolean boolean_A() {
|
||
return this.var_boolean_E;
|
||
}
|
||
|
||
public void B(boolean bl) {
|
||
this.F = bl;
|
||
}
|
||
|
||
public boolean boolean_B() {
|
||
return this.F;
|
||
}
|
||
|
||
public void C(boolean bl) {
|
||
this.G = bl;
|
||
}
|
||
|
||
public boolean boolean_C() {
|
||
return this.G;
|
||
}
|
||
|
||
public String java_lang_String_p() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void p(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public void q(String string) {
|
||
this.var_java_lang_String_s = string;
|
||
}
|
||
|
||
public String java_lang_String_q() {
|
||
return this.var_java_lang_String_s;
|
||
}
|
||
|
||
public void r(String string) {
|
||
this.var_java_lang_String_t = string;
|
||
}
|
||
|
||
public String java_lang_String_r() {
|
||
return this.var_java_lang_String_t;
|
||
}
|
||
|
||
public void D(boolean bl) {
|
||
this.H = bl;
|
||
}
|
||
|
||
public boolean boolean_D() {
|
||
return this.H;
|
||
}
|
||
|
||
public void E(boolean bl) {
|
||
this.I = bl;
|
||
}
|
||
|
||
public boolean boolean_E() {
|
||
return this.I;
|
||
}
|
||
|
||
public void F(boolean bl) {
|
||
this.J = bl;
|
||
}
|
||
|
||
public boolean F() {
|
||
return this.J;
|
||
}
|
||
|
||
public void G(boolean bl) {
|
||
this.K = bl;
|
||
}
|
||
|
||
public boolean G() {
|
||
return this.K;
|
||
}
|
||
|
||
public void H(boolean bl) {
|
||
this.L = bl;
|
||
}
|
||
|
||
public boolean H() {
|
||
return this.L;
|
||
}
|
||
|
||
public List<String> b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void b(List<String> list) {
|
||
this.var_java_lang_String_b = list;
|
||
}
|
||
|
||
public String java_lang_String_s() {
|
||
return this.var_java_lang_String_u;
|
||
}
|
||
|
||
public void s(String string) {
|
||
this.var_java_lang_String_u = string;
|
||
}
|
||
|
||
public boolean I() {
|
||
return this.M;
|
||
}
|
||
|
||
public void I(boolean bl) {
|
||
this.M = bl;
|
||
}
|
||
|
||
public boolean J() {
|
||
return this.N;
|
||
}
|
||
|
||
public void J(boolean bl) {
|
||
this.N = bl;
|
||
}
|
||
|
||
public String java_lang_String_t() {
|
||
return this.var_java_lang_String_v;
|
||
}
|
||
|
||
public void t(String string) {
|
||
this.var_java_lang_String_v = string;
|
||
}
|
||
|
||
public String java_lang_String_u() {
|
||
return this.var_java_lang_String_w;
|
||
}
|
||
|
||
public void u(String string) {
|
||
this.var_java_lang_String_w = string;
|
||
}
|
||
|
||
public boolean K() {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public void K(boolean bl) {
|
||
this.var_boolean_c = bl;
|
||
}
|
||
|
||
public void v(String string) {
|
||
this.var_java_lang_String_y = string;
|
||
}
|
||
|
||
public String java_lang_String_v() {
|
||
return this.var_java_lang_String_y;
|
||
}
|
||
|
||
public void w(String string) {
|
||
this.var_java_lang_String_z = string;
|
||
}
|
||
|
||
public String java_lang_String_w() {
|
||
return this.var_java_lang_String_z;
|
||
}
|
||
|
||
public boolean L() {
|
||
return this.var_boolean_h;
|
||
}
|
||
|
||
public void L(boolean bl) {
|
||
this.var_boolean_h = bl;
|
||
}
|
||
|
||
public boolean M() {
|
||
return this.var_boolean_i;
|
||
}
|
||
|
||
public boolean N() {
|
||
return this.Q;
|
||
}
|
||
|
||
public void M(boolean bl) {
|
||
this.Q = bl;
|
||
}
|
||
|
||
public void N(boolean bl) {
|
||
this.var_boolean_i = bl;
|
||
}
|
||
|
||
public boolean O() {
|
||
return this.O;
|
||
}
|
||
|
||
public void O(boolean bl) {
|
||
this.O = bl;
|
||
}
|
||
|
||
public String java_lang_String_x() {
|
||
return this.var_java_lang_String_A;
|
||
}
|
||
|
||
public void x(String string) {
|
||
this.var_java_lang_String_A = string;
|
||
}
|
||
|
||
public boolean P() {
|
||
return this.var_boolean_b;
|
||
}
|
||
|
||
public void P(boolean bl) {
|
||
this.var_boolean_b = bl;
|
||
}
|
||
|
||
public boolean Q() {
|
||
return this.S;
|
||
}
|
||
|
||
public void Q(boolean bl) {
|
||
this.S = bl;
|
||
}
|
||
|
||
public String java_lang_String_y() {
|
||
return this.var_java_lang_String_C;
|
||
}
|
||
|
||
public void y(String string) {
|
||
this.var_java_lang_String_C = string;
|
||
}
|
||
|
||
public boolean R() {
|
||
return this.R;
|
||
}
|
||
|
||
public void R(boolean bl) {
|
||
this.R = bl;
|
||
}
|
||
|
||
public String java_lang_String_z() {
|
||
return this.var_java_lang_String_B;
|
||
}
|
||
|
||
public void z(String string) {
|
||
this.var_java_lang_String_B = string;
|
||
}
|
||
|
||
public String java_lang_String_A() {
|
||
return this.var_java_lang_String_D;
|
||
}
|
||
|
||
public void A(String string) {
|
||
this.var_java_lang_String_D = string;
|
||
}
|
||
|
||
public boolean S() {
|
||
return this.T;
|
||
}
|
||
|
||
public void S(boolean bl) {
|
||
this.T = bl;
|
||
}
|
||
|
||
public boolean T() {
|
||
return this.U;
|
||
}
|
||
|
||
public void T(boolean bl) {
|
||
this.U = bl;
|
||
}
|
||
|
||
public boolean U() {
|
||
return this.V;
|
||
}
|
||
|
||
public void U(boolean bl) {
|
||
this.V = bl;
|
||
}
|
||
|
||
public boolean V() {
|
||
return this.W;
|
||
}
|
||
|
||
public void V(boolean bl) {
|
||
this.W = bl;
|
||
}
|
||
|
||
public String java_lang_String_B() {
|
||
return this.var_java_lang_String_E;
|
||
}
|
||
|
||
public void B(String string) {
|
||
this.var_java_lang_String_E = string;
|
||
}
|
||
|
||
public String java_lang_String_C() {
|
||
return this.var_java_lang_String_i;
|
||
}
|
||
|
||
public void C(String string) {
|
||
this.var_java_lang_String_i = string;
|
||
}
|
||
|
||
public String java_lang_String_D() {
|
||
return this.var_java_lang_String_j;
|
||
}
|
||
|
||
public void D(String string) {
|
||
this.var_java_lang_String_j = string;
|
||
}
|
||
|
||
public String java_lang_String_E() {
|
||
return this.var_java_lang_String_h;
|
||
}
|
||
|
||
public void E(String string) {
|
||
this.var_java_lang_String_h = string;
|
||
}
|
||
|
||
public boolean W() {
|
||
return this.P;
|
||
}
|
||
|
||
public void W(boolean bl) {
|
||
this.P = bl;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
public class q {
|
||
private boolean var_boolean_a;
|
||
private String var_java_lang_String_a;
|
||
private String b;
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof q)) {
|
||
return false;
|
||
}
|
||
q q2 = (q)object;
|
||
if (!q2.a(this)) {
|
||
return false;
|
||
}
|
||
if (this.boolean_a() != q2.boolean_a()) {
|
||
return false;
|
||
}
|
||
String string = this.java_lang_String_a();
|
||
String string2 = q2.java_lang_String_a();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
String string3 = this.b();
|
||
String string4 = q2.b();
|
||
return !(string3 == null ? string4 != null : !string3.equals(string4));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof q;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
n3 = n3 * 59 + (this.boolean_a() ? 79 : 97);
|
||
String string = this.java_lang_String_a();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
String string2 = this.b();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "MybatisGenerateDatabaseInfo(isUseIntellij=" + this.boolean_a() + ", databaseName=" + this.java_lang_String_a() + ", databaseType=" + this.b() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.collect.Sets
|
||
* com.google.common.io.Files
|
||
* com.google.gson.Gson
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.ide.fileTemplates.FileTemplateManager
|
||
* com.intellij.ide.util.TreeClassChooser
|
||
* com.intellij.ide.util.TreeClassChooserFactory
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.EditorFactory
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.editor.highlighter.EditorHighlighterFactory
|
||
* com.intellij.openapi.fileChooser.FileChooser
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptor
|
||
* com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
|
||
* com.intellij.openapi.ide.CopyPasteManager
|
||
* com.intellij.openapi.module.Module
|
||
* com.intellij.openapi.module.ModuleManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.project.ProjectUtil
|
||
* com.intellij.openapi.ui.ComboBox
|
||
* com.intellij.openapi.ui.DialogBuilder
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.TextComponentAccessor
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginsAdvertiser
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.JavaCodeFragment$VisibilityChecker
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.refactoring.ui.PackageNameReferenceEditorCombo
|
||
* com.intellij.ui.EditorComboBox
|
||
* com.intellij.ui.ReferenceEditorComboWithBrowseButton
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* com.intellij.util.Consumer
|
||
* com.intellij.util.ObjectUtils
|
||
* com.intellij.util.ui.JBDimension
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.IOUtils
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.mybatisGenerator.g;
|
||
import com.ccnode.codegenerator.mybatisGenerator.k;
|
||
import com.ccnode.codegenerator.mybatisGenerator.n;
|
||
import com.ccnode.codegenerator.mybatisGenerator.o;
|
||
import com.ccnode.codegenerator.mybatisGenerator.p;
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.mybatisGenerator.x;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.myconfigurable.TableGenerateConfig;
|
||
import com.ccnode.codegenerator.myconfigurable.UserPackageAndPathInfoByModule;
|
||
import com.ccnode.codegenerator.n.d_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.collect.Sets;
|
||
import com.google.common.io.Files;
|
||
import com.google.gson.Gson;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.ide.fileTemplates.FileTemplateManager;
|
||
import com.intellij.ide.util.TreeClassChooser;
|
||
import com.intellij.ide.util.TreeClassChooserFactory;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.EditorFactory;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.editor.highlighter.EditorHighlighterFactory;
|
||
import com.intellij.openapi.fileChooser.FileChooser;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||
import com.intellij.openapi.ide.CopyPasteManager;
|
||
import com.intellij.openapi.module.Module;
|
||
import com.intellij.openapi.module.ModuleManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.project.ProjectUtil;
|
||
import com.intellij.openapi.ui.ComboBox;
|
||
import com.intellij.openapi.ui.DialogBuilder;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.TextComponentAccessor;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginsAdvertiser;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.JavaCodeFragment;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.refactoring.ui.PackageNameReferenceEditorCombo;
|
||
import com.intellij.ui.EditorComboBox;
|
||
import com.intellij.ui.ReferenceEditorComboWithBrowseButton;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import com.intellij.util.Consumer;
|
||
import com.intellij.util.ObjectUtils;
|
||
import com.intellij.util.ui.JBDimension;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Desktop;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.awt.datatransfer.Transferable;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.File;
|
||
import java.io.FileOutputStream;
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.io.OutputStream;
|
||
import java.lang.reflect.Method;
|
||
import java.nio.charset.Charset;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.ResourceBundle;
|
||
import java.util.Set;
|
||
import java.util.function.BiConsumer;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.DefaultComboBoxModel;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTabbedPane;
|
||
import javax.swing.JTextArea;
|
||
import javax.swing.JTextField;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.IOUtils;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class r {
|
||
private ComboBox var_com_intellij_openapi_ui_ComboBox_a = Maps.newHashMap();
|
||
private PackageNameReferenceEditorCombo var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b = Maps.newHashMap();
|
||
private n var_com_ccnode_codegenerator_mybatisGenerator_n_a;
|
||
private PackageNameReferenceEditorCombo var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c;
|
||
private JCheckBox l;
|
||
private PackageNameReferenceEditorCombo var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d;
|
||
private n var_com_ccnode_codegenerator_mybatisGenerator_n_b;
|
||
private com.ccnode.codegenerator.ab.b var_com_ccnode_codegenerator_ab_b_a;
|
||
private n var_com_ccnode_codegenerator_mybatisGenerator_n_c;
|
||
private n var_com_ccnode_codegenerator_mybatisGenerator_n_d;
|
||
private JCheckBox m;
|
||
private JCheckBox n;
|
||
private JCheckBox o;
|
||
private JCheckBox p;
|
||
private JCheckBox q;
|
||
private JCheckBox r;
|
||
private JCheckBox s;
|
||
private JCheckBox t;
|
||
private JCheckBox u;
|
||
private JCheckBox v;
|
||
private JCheckBox w;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
private JCheckBox x;
|
||
private JCheckBox y;
|
||
private JCheckBox z;
|
||
private JCheckBox A;
|
||
private JCheckBox B;
|
||
private n var_com_ccnode_codegenerator_mybatisGenerator_n_e;
|
||
private PackageNameReferenceEditorCombo var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e;
|
||
private ReferenceEditorComboWithBrowseButton var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a;
|
||
private ReferenceEditorComboWithBrowseButton var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b;
|
||
private JCheckBox C;
|
||
private JTabbedPane var_javax_swing_JTabbedPane_a;
|
||
private JCheckBox D;
|
||
private JCheckBox E;
|
||
private JCheckBox F;
|
||
private JCheckBox G;
|
||
private JCheckBox H;
|
||
private JCheckBox I;
|
||
private JCheckBox J;
|
||
private JCheckBox K;
|
||
private JCheckBox L;
|
||
private JCheckBox M;
|
||
private JCheckBox N;
|
||
private JCheckBox O;
|
||
private JCheckBox P;
|
||
private JCheckBox Q;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JCheckBox R;
|
||
public JComboBox var_javax_swing_JComboBox_a;
|
||
private JCheckBox S;
|
||
private n var_com_ccnode_codegenerator_mybatisGenerator_n_f;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public PackageNameReferenceEditorCombo var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_a;
|
||
public JTextField var_javax_swing_JTextField_a;
|
||
public JTextField var_javax_swing_JTextField_b;
|
||
public JCheckBox var_javax_swing_JCheckBox_b;
|
||
public JCheckBox var_javax_swing_JCheckBox_c;
|
||
public JButton var_javax_swing_JButton_b;
|
||
public JButton var_javax_swing_JButton_c;
|
||
public JButton var_javax_swing_JButton_d;
|
||
private JTextField var_javax_swing_JTextField_i;
|
||
public JCheckBox var_javax_swing_JCheckBox_d;
|
||
public JCheckBox var_javax_swing_JCheckBox_e;
|
||
public JTextArea var_javax_swing_JTextArea_a;
|
||
public JButton var_javax_swing_JButton_e;
|
||
public JButton var_javax_swing_JButton_f;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_f;
|
||
public JTextField var_javax_swing_JTextField_c;
|
||
public JTextField var_javax_swing_JTextField_d;
|
||
public JButton var_javax_swing_JButton_g;
|
||
public JButton var_javax_swing_JButton_h;
|
||
public JCheckBox var_javax_swing_JCheckBox_g;
|
||
public JCheckBox var_javax_swing_JCheckBox_h;
|
||
public JCheckBox var_javax_swing_JCheckBox_i;
|
||
public JCheckBox j;
|
||
public JTextField var_javax_swing_JTextField_e;
|
||
public JButton var_javax_swing_JButton_i;
|
||
public JTextField var_javax_swing_JTextField_f;
|
||
public JTextField var_javax_swing_JTextField_g;
|
||
public JTextField var_javax_swing_JTextField_h;
|
||
public JCheckBox k;
|
||
public static final String var_java_lang_String_a = "mybatis_generator_service_recent";
|
||
public static final String var_java_lang_String_b = "mybatis_generator_service_interface_recent";
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
private Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
private TableGenerateConfig var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a;
|
||
private o var_com_ccnode_codegenerator_mybatisGenerator_o_a;
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private Map<String, List<String>> var_java_util_Map_java_lang_String,_java_util_List_java_lang_String___a;
|
||
private Map<String, List<String>> var_java_util_Map_java_lang_String,_java_util_List_java_lang_String___b;
|
||
private com.ccnode.codegenerator.mybatisGenerator.a.a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
private List<String> var_java_util_List_java_lang_String__b;
|
||
private String var_java_lang_String_f;
|
||
public static final String var_java_lang_String_c = "java_mapper_package_recent_key";
|
||
public static final String var_java_lang_String_d = "mapper_package_recent_key";
|
||
public static final String var_java_lang_String_e = "mybatisJavaModelRecent";
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public List<String> a() {
|
||
return this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b = list;
|
||
k k2 = (k)((Object)ObjectUtils.tryCast((Object)this.var_javax_swing_JPanel_b, k.class));
|
||
k2.a(list);
|
||
}
|
||
|
||
public r(Project project, boolean bl, ProjectProfile projectProfile, Profile profile, TableGenerateConfig tableGenerateConfig, com.ccnode.codegenerator.mybatisGenerator.a.a a2, List<String> list, String string) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_Boolean_a = bl;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = profile;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a = tableGenerateConfig;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b = list;
|
||
this.var_java_lang_String_f = string;
|
||
Module[] moduleArray = ModuleManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getModules();
|
||
for (Module module : moduleArray) {
|
||
VirtualFile virtualFile;
|
||
Object object;
|
||
List<VirtualFile> list2 = com.ccnode.codegenerator.y.b.a.c(module);
|
||
if (!list2.isEmpty()) {
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.add(module.getName());
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.put(module.getName(), Lists.newArrayList());
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.put(module.getName(), Lists.newArrayList());
|
||
object = list2.iterator();
|
||
while (object.hasNext()) {
|
||
virtualFile = (VirtualFile)object.next();
|
||
((List)this.var_com_intellij_openapi_ui_ComboBox_a.get(module.getName())).add(virtualFile.getPath());
|
||
}
|
||
}
|
||
if ((object = com.ccnode.codegenerator.y.b.a.d(module)).isEmpty()) continue;
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.put(module.getName(), Lists.newArrayList());
|
||
virtualFile = object.iterator();
|
||
while (virtualFile.hasNext()) {
|
||
VirtualFile virtualFile2 = virtualFile.next();
|
||
((List)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.get(module.getName())).add(virtualFile2.getPath());
|
||
}
|
||
}
|
||
if (this.var_com_intellij_openapi_ui_ComboBox_a.isEmpty()) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"there is no module in project, please set up at least one module", (String)"NO MODULE FOUND");
|
||
return;
|
||
}
|
||
this.c();
|
||
this.a(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a);
|
||
this.M.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (r.this.M.isSelected()) {
|
||
r.this.N.setSelected(false);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_h.addActionListener(new ActionListener(){
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ com.ccnode.codegenerator.mybatisGenerator.a.a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (this.var_java_lang_String_a == null) {
|
||
int n2 = Messages.showDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Table cache info", (String)"Table cache info", (String[])new String[]{"Show All Table Cache", "Clear Cache", "Cancel"}, (int)0, null);
|
||
if (n2 == 0) {
|
||
ProjectProfile projectProfile = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_project_Project_a);
|
||
Map<String, TableGenerateConfig> map = projectProfile.getTableGenerateConfigs();
|
||
String string = new Gson().toJson(map);
|
||
com.ccnode.codegenerator.ag.e.a a2 = new com.ccnode.codegenerator.ag.e.a(this.var_com_intellij_openapi_project_Project_a, string);
|
||
a2.show();
|
||
} else if (n2 == 1) {
|
||
ProjectProfile projectProfile = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_project_Project_a);
|
||
Map<String, TableGenerateConfig> map = projectProfile.getTableGenerateConfigs();
|
||
int n3 = Messages.showOkCancelDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Do you really want to clear table info", (String)"Clear table cache", null);
|
||
if (n3 == 0) {
|
||
map.clear();
|
||
Messages.showMessageDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Success, please reopen mybatis generator", (String)"Success", (Icon)Messages.getInformationIcon());
|
||
}
|
||
}
|
||
} else {
|
||
int n4 = Messages.showDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Table cache info", (String)"Table cache info", (String[])new String[]{"Show current table cache", "Clear current table cache", "Cancel"}, (int)0, null);
|
||
if (n4 == 0) {
|
||
ProjectProfile projectProfile = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_project_Project_a);
|
||
Map<String, TableGenerateConfig> map = projectProfile.getTableGenerateConfigs();
|
||
String string = com.ccnode.codegenerator.mybatisGenerator.u.a(this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.b());
|
||
TableGenerateConfig tableGenerateConfig = map.get(string);
|
||
String string2 = new Gson().toJson((Object)tableGenerateConfig);
|
||
com.ccnode.codegenerator.ag.e.a a3 = new com.ccnode.codegenerator.ag.e.a(this.var_com_intellij_openapi_project_Project_a, string2);
|
||
a3.show();
|
||
} else if (n4 == 1) {
|
||
ProjectProfile projectProfile = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_project_Project_a);
|
||
Map<String, TableGenerateConfig> map = projectProfile.getTableGenerateConfigs();
|
||
int n5 = Messages.showOkCancelDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Do you really want to clear table info", (String)"Clear table cache", null);
|
||
if (n5 == 0) {
|
||
String string = com.ccnode.codegenerator.mybatisGenerator.u.a(this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.b());
|
||
map.remove(string);
|
||
Messages.showMessageDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Success, please reopen mybatis generator", (String)"Success", (Icon)Messages.getInformationIcon());
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
ProjectProfile projectProfile = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a);
|
||
String string = new Gson().toJson((Object)projectProfile);
|
||
String string2 = this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_ui_ComboBox_a.getSelectedItem().toString() + com.ccnode.codegenerator.ad.k.c() + "Config.json";
|
||
File file = Files.createTempDir();
|
||
File file2 = new File(file + "/" + string2);
|
||
try {
|
||
FileOutputStream fileOutputStream = new FileOutputStream(file2);
|
||
IOUtils.write((String)string, (OutputStream)fileOutputStream, (Charset)Charsets.UTF_8);
|
||
fileOutputStream.close();
|
||
Desktop.getDesktop().open(file);
|
||
}
|
||
catch (IOException iOException) {
|
||
iOException.printStackTrace();
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_c.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
FileChooser.chooseFile((FileChooserDescriptor)new FileChooserDescriptor(true, false, false, false, false, false), (Project)this.var_com_intellij_openapi_project_Project_a, null, (Consumer)new Consumer<VirtualFile>(){
|
||
|
||
public void a(VirtualFile virtualFile) {
|
||
try {
|
||
ProjectProfile projectProfile;
|
||
String string = IOUtils.toString((InputStream)virtualFile.getInputStream(), (Charset)Charsets.UTF_8);
|
||
var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile = (ProjectProfile)new Gson().fromJson(string, ProjectProfile.class);
|
||
var_com_ccnode_codegenerator_mybatisGenerator_r_a.a(projectProfile);
|
||
}
|
||
catch (IOException iOException) {
|
||
iOException.printStackTrace();
|
||
}
|
||
}
|
||
|
||
public /* synthetic */ void consume(Object object) {
|
||
this.a((VirtualFile)object);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_d.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.void_a();
|
||
Messages.showInfoMessage((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Success", (String)"Success");
|
||
}
|
||
});
|
||
this.N.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (r.this.N.isSelected()) {
|
||
r.this.M.setSelected(false);
|
||
}
|
||
}
|
||
});
|
||
Object object = projectProfile.getControllerTemplateString();
|
||
if (((String)object).isEmpty()) {
|
||
try {
|
||
InputStream inputStream = r.class.getClassLoader().getResourceAsStream("templates/myController.vm");
|
||
object = IOUtils.toString((InputStream)inputStream, (Charset)Charsets.UTF_8);
|
||
projectProfile.setControllerTemplateString((String)object);
|
||
inputStream.close();
|
||
}
|
||
catch (IOException iOException) {
|
||
iOException.printStackTrace();
|
||
}
|
||
}
|
||
String string2 = ((String)object).replace("\r", "");
|
||
projectProfile.setControllerTemplateString(string2);
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
final /* synthetic */ com.ccnode.codegenerator.mybatisGenerator.a.a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = profile;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getControllerTemplateString();
|
||
o o2 = new o();
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.a(o2);
|
||
g g2 = new g(string, o2, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a, this.var_java_lang_String_a, this.var_com_intellij_openapi_project_Project_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a);
|
||
g2.showAndGet();
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_e.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = profile;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
o o2 = new o();
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.a(o2);
|
||
String string = com.ccnode.codegenerator.mybatisGenerator.x.a.a(o2, this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_project_Project_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a, this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a);
|
||
Messages.showTextAreaDialog((JTextField)new JTextField(string), (String)"Project Template Data(copy to mybatisCodehelper.vm file)", (String)"Template Data");
|
||
CopyPasteManager.getInstance().setContents((Transferable)new StringSelection(string));
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_f.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
PluginsAdvertiser.installAndEnablePlugins((Set)Sets.newHashSet((Object[])new String[]{"com.bruce.easycode.mybatiscodehelper"}), (Runnable)new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
}
|
||
});
|
||
}
|
||
});
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/generateByTemplate");
|
||
}
|
||
}, null);
|
||
this.var_javax_swing_JButton_g.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
InputStream inputStream = com.ccnode.codegenerator.mybatisGenerator.d.a.class.getClassLoader().getResourceAsStream("ognlExample.txt");
|
||
try {
|
||
String string = IOUtils.toString((InputStream)inputStream, (Charset)Charsets.UTF_8);
|
||
inputStream.close();
|
||
String string2 = string.replace("\r", "");
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a(string2, this.var_com_intellij_openapi_project_Project_a, "xx.txt", "Ognl example");
|
||
}
|
||
catch (IOException iOException) {
|
||
throw new RuntimeException(iOException);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_i.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
InputStream inputStream = com.ccnode.codegenerator.mybatisGenerator.d.a.class.getClassLoader().getResourceAsStream("ognlExample.txt");
|
||
try {
|
||
String string = IOUtils.toString((InputStream)inputStream, (Charset)Charsets.UTF_8);
|
||
inputStream.close();
|
||
String string2 = string.replace("\r", "");
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a(string2, this.var_com_intellij_openapi_project_Project_a, "xx.txt", "Ognl example");
|
||
}
|
||
catch (IOException iOException) {
|
||
throw new RuntimeException(iOException);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
public void void_a() {
|
||
o o2 = new o();
|
||
this.a(o2);
|
||
TableGenerateConfig tableGenerateConfig = this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a;
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a == null) {
|
||
tableGenerateConfig = new TableGenerateConfig();
|
||
}
|
||
com.ccnode.codegenerator.mybatisGenerator.p.a.a(o2, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, tableGenerateConfig);
|
||
}
|
||
|
||
private void a(ProjectProfile projectProfile) {
|
||
Object object;
|
||
this.w.setSelected(projectProfile.getAddSchemaName());
|
||
this.var_javax_swing_JCheckBox_f.setSelected(projectProfile.getUseJakataAnnotation());
|
||
this.l.setSelected(projectProfile.getGenerateService());
|
||
this.B.setSelected(projectProfile.getGenerateServiceInterface());
|
||
this.var_javax_swing_JTextField_d.setText(projectProfile.getServiceOgnlName());
|
||
this.var_javax_swing_JTextField_e.setText(projectProfile.getServiceInterfaceOgnlName());
|
||
this.A.setSelected(projectProfile.getNoJdbcType());
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d.setEnabled(projectProfile.getGenerateService());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.setEnabled(projectProfile.getGenerateService());
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e.setEnabled(projectProfile.getGenerateServiceInterface());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.setEnabled(projectProfile.getGenerateServiceInterface());
|
||
this.l.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d.setEnabled(r.this.l.isSelected());
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.setEnabled(r.this.l.isSelected());
|
||
}
|
||
});
|
||
this.B.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e.setEnabled(r.this.B.isSelected());
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.setEnabled(r.this.B.isSelected());
|
||
}
|
||
});
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.setTextFieldPreferredWidth(70);
|
||
this.p.setSelected(projectProfile.getGenComment());
|
||
this.M.setSelected(projectProfile.getLombokDataAnnotation());
|
||
this.var_javax_swing_JCheckBox_e.setSelected(projectProfile.getCustomizedLombokAnnotation());
|
||
this.var_javax_swing_JTextArea_a.setText(projectProfile.getCustomizedLombokValue());
|
||
this.N.setSelected(projectProfile.getLombokGetterSetterAnnotation());
|
||
this.O.setSelected(projectProfile.getLombokBuilderAnnotation());
|
||
this.Q.setSelected(projectProfile.getLombokAllArgConstructor());
|
||
this.P.setSelected(projectProfile.getLombokNoArgsConstructor());
|
||
this.t.setSelected(projectProfile.getUseSwagger());
|
||
if (projectProfile.getMapperAnnotaion()) {
|
||
this.o.setSelected(true);
|
||
}
|
||
this.var_javax_swing_JCheckBox_b.setSelected(projectProfile.getUseOpenApi());
|
||
if (projectProfile.getUseExample()) {
|
||
this.s.setSelected(true);
|
||
}
|
||
this.u.setSelected(projectProfile.getUseCommonMapper());
|
||
this.v.setSelected(projectProfile.getUserMybatisPlus());
|
||
this.K.setSelected(projectProfile.getUseMybatisPlus2());
|
||
this.L.setSelected(projectProfile.getMybatisPlusStaticField());
|
||
this.var_javax_swing_JCheckBox_c.setSelected(projectProfile.getMybatisplusGenerateUpdateSelective());
|
||
this.k.setSelected(projectProfile.getMybatisPlusGenerateByPrimaryKey());
|
||
this.u.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (r.this.u.isSelected()) {
|
||
r.this.v.setSelected(false);
|
||
}
|
||
r.this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setEnabled(r.this.u.isSelected());
|
||
}
|
||
});
|
||
this.v.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (r.this.v.isSelected()) {
|
||
r.this.u.setSelected(false);
|
||
r.this.K.setSelected(false);
|
||
}
|
||
}
|
||
});
|
||
this.K.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (r.this.v.isSelected()) {
|
||
r.this.u.setSelected(false);
|
||
r.this.v.setSelected(false);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JCheckBox_g.setSelected(projectProfile.getFieldFill());
|
||
if (projectProfile.getModelAddToString()) {
|
||
this.m.setSelected(true);
|
||
}
|
||
if (projectProfile.getModelAddEqualHashCode()) {
|
||
this.n.setSelected(true);
|
||
}
|
||
if (projectProfile.getJavaModelTrimString()) {
|
||
this.q.setSelected(true);
|
||
}
|
||
this.r.setSelected(projectProfile.getAddSerializeUid());
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setEnabled(this.u.isSelected());
|
||
this.C.setSelected(projectProfile.getP3CComment());
|
||
this.J.setSelected(projectProfile.getCheckBlobColumn());
|
||
this.var_javax_swing_JCheckBox_d.setSelected(projectProfile.getJavaxValidation());
|
||
this.var_javax_swing_JCheckBox_a.setSelected(projectProfile.getRemoveIsPrefix());
|
||
this.var_javax_swing_JTextField_a.setText(projectProfile.getRegexString());
|
||
this.var_javax_swing_JTextField_b.setText(projectProfile.getReplacement());
|
||
this.var_javax_swing_JTextField_i.setText(projectProfile.getMybatisGeneratorMapperSuffix());
|
||
this.var_javax_swing_JTextField_f.setText(projectProfile.getMybatisMapperPrefix());
|
||
this.var_javax_swing_JTextField_g.setText(projectProfile.getMybatisXmlPrefix());
|
||
this.var_javax_swing_JTextField_h.setText(projectProfile.getGlobalIgnoreColumns());
|
||
this.var_javax_swing_JTextField_c.setText(projectProfile.getMybatisXmlSuffix());
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a != null && this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getJavaModelName() != null) {
|
||
this.D.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getInsertMethodEnabled());
|
||
this.E.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getInsertSelectiveMethodEnabled());
|
||
this.F.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getSelectByPrimaryKeyEnabled());
|
||
this.I.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getDeleteByPrimayKeyEnabled());
|
||
this.G.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUpdateByPrimaykeyEnabled());
|
||
this.H.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUpdateByPrimaryKeySelectiveEnabled());
|
||
this.x.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUpdateBatch());
|
||
this.R.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUpdateBatchSelective());
|
||
this.z.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getBatchInsert());
|
||
this.var_javax_swing_JCheckBox_h.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getDeleteByPrimaryKeyIn());
|
||
this.var_javax_swing_JCheckBox_i.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUpdateBatchuseMultiQuery());
|
||
this.j.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getBatchInsertSelectiveUseDefaultForNull());
|
||
this.y.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getInsertOnDuplicateKey());
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getMybatisplusIdType() == null) {
|
||
String string;
|
||
var2_2 = false;
|
||
if (this.var_java_lang_String_f != null && (object = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.com_ccnode_codegenerator_mybatisGenerator_t_a(this.var_java_lang_String_f)) != null && (string = ((t)object).a()) != null) {
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem("AUTO");
|
||
var2_2 = true;
|
||
}
|
||
if (!var2_2) {
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(projectProfile.getMybatisPlusIdType());
|
||
}
|
||
} else {
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getMybatisplusIdType());
|
||
}
|
||
} else {
|
||
String string;
|
||
this.D.setSelected(projectProfile.getInsertMethodEnabled());
|
||
this.E.setSelected(projectProfile.getInsertSelectiveMethodEnabled());
|
||
this.F.setSelected(projectProfile.getSelectByPrimaryKeyEnabled());
|
||
this.I.setSelected(projectProfile.getDeleteByPrimayKeyEnabled());
|
||
this.G.setSelected(projectProfile.getUpdateByPrimaykeyEnabled());
|
||
this.H.setSelected(projectProfile.getUpdateByPrimaryKeySelectiveEnabled());
|
||
this.x.setSelected(projectProfile.getUpdateBatch());
|
||
this.R.setSelected(projectProfile.getUpdateBatchSelective());
|
||
this.z.setSelected(projectProfile.getBatchInsert());
|
||
this.var_javax_swing_JCheckBox_h.setSelected(projectProfile.getDeleteByPrimaryKeyIn());
|
||
this.var_javax_swing_JCheckBox_i.setSelected(projectProfile.getUpdateBatchUseMultiQuery());
|
||
this.j.setSelected(projectProfile.getBatchInsertSelectiveUseDefaultForNull());
|
||
this.y.setSelected(projectProfile.getInsertOnDuplicateKey());
|
||
var2_2 = false;
|
||
if (this.var_java_lang_String_f != null && (object = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.com_ccnode_codegenerator_mybatisGenerator_t_a(this.var_java_lang_String_f)) != null && (string = ((t)object).a()) != null) {
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem("AUTO");
|
||
var2_2 = true;
|
||
}
|
||
if (!var2_2) {
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(projectProfile.getMybatisPlusIdType());
|
||
}
|
||
}
|
||
this.S.setSelected(projectProfile.getGenerateController());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_f.setText(projectProfile.getControllerFolderPath());
|
||
String string = com.ccnode.codegenerator.mybatisGenerator.r.a(projectProfile, this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, (List<String>)this.var_com_intellij_openapi_ui_ComboBox_a);
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.setSelectedItem((Object)string);
|
||
object = com.ccnode.codegenerator.mybatisGenerator.u.a(string, projectProfile, (Map<String, List<String>>)this.var_com_intellij_openapi_ui_ComboBox_a, (Map<String, List<String>>)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b);
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a((ReferenceEditorComboWithBrowseButton)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b, ((UserPackageAndPathInfoByModule)object).getJavaModelPacakge());
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a((ReferenceEditorComboWithBrowseButton)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c, ((UserPackageAndPathInfoByModule)object).getJavaMapperPackage());
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a(this.var_com_ccnode_codegenerator_ab_b_a, ((UserPackageAndPathInfoByModule)object).getXmlPackage());
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a((ReferenceEditorComboWithBrowseButton)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d, ((UserPackageAndPathInfoByModule)object).getJavaServicePackage());
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a((ReferenceEditorComboWithBrowseButton)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e, ((UserPackageAndPathInfoByModule)object).getJavaServiceInterfacePackage());
|
||
com.ccnode.codegenerator.mybatisGenerator.r.a((ReferenceEditorComboWithBrowseButton)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a, projectProfile.getJavaControllerPackage());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.setText(com.ccnode.codegenerator.mybatisGenerator.r.a(((UserPackageAndPathInfoByModule)object).getJavaModelPath()));
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.setText(com.ccnode.codegenerator.mybatisGenerator.r.a(((UserPackageAndPathInfoByModule)object).getJavaServicePath()));
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.setText(com.ccnode.codegenerator.mybatisGenerator.r.a(((UserPackageAndPathInfoByModule)object).getJavaServiceInterfacePath()));
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_d.setText(com.ccnode.codegenerator.mybatisGenerator.r.a(((UserPackageAndPathInfoByModule)object).getXmlPath()));
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText(projectProfile.getCommonMapperBaseClass());
|
||
if (projectProfile.getModelSuperClass() != null) {
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b.appendItem(projectProfile.getModelSuperClass());
|
||
((EditorComboBox)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b.getChildComponent()).setSelectedItem((Object)projectProfile.getModelSuperClass());
|
||
}
|
||
if (projectProfile.getMapperSuperClass() != null) {
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.appendItem(projectProfile.getMapperSuperClass());
|
||
((EditorComboBox)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getChildComponent()).setSelectedItem((Object)projectProfile.getMapperSuperClass());
|
||
}
|
||
}
|
||
|
||
public static void a(ReferenceEditorComboWithBrowseButton referenceEditorComboWithBrowseButton, String string) {
|
||
((EditorComboBox)referenceEditorComboWithBrowseButton.getChildComponent()).addItem((Object)com.ccnode.codegenerator.mybatisGenerator.r.a(string));
|
||
((EditorComboBox)referenceEditorComboWithBrowseButton.getChildComponent()).setSelectedItem((Object)com.ccnode.codegenerator.mybatisGenerator.r.a(string));
|
||
}
|
||
|
||
public static String a(String string) {
|
||
if (string == null) {
|
||
return "";
|
||
}
|
||
return string;
|
||
}
|
||
|
||
private void b() {
|
||
Object object2;
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a == null) {
|
||
System.out.println("myProject profile is null");
|
||
}
|
||
this.var_com_intellij_openapi_ui_ComboBox_a = new ComboBox();
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.setSwingPopup(false);
|
||
for (Object object2 : this.var_com_intellij_openapi_ui_ComboBox_a) {
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.addItem(object2);
|
||
}
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b = new PackageNameReferenceEditorCombo("", this.var_com_intellij_openapi_project_Project_a, var_java_lang_String_e, "choose java model package for generate mybatis model");
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c = new PackageNameReferenceEditorCombo("", this.var_com_intellij_openapi_project_Project_a, var_java_lang_String_c, "choose java mapper package");
|
||
this.var_com_ccnode_codegenerator_ab_b_a = new com.ccnode.codegenerator.ab.b("", this.var_com_intellij_openapi_project_Project_a, var_java_lang_String_d, "choose mapper xml package");
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d = new PackageNameReferenceEditorCombo("", this.var_com_intellij_openapi_project_Project_a, var_java_lang_String_a, "choose java service package");
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e = new PackageNameReferenceEditorCombo("", this.var_com_intellij_openapi_project_Project_a, var_java_lang_String_b, "choose java service interface package");
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a = new PackageNameReferenceEditorCombo("", this.var_com_intellij_openapi_project_Project_a, var_java_lang_String_c, "choose java mapper package");
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_a = new n(this.var_com_intellij_openapi_project_Project_a);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.forEach(new BiConsumer<String, List<String>>(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
public void a(String string, List<String> list) {
|
||
this.var_java_util_List_a.addAll(list);
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (List)object2);
|
||
}
|
||
});
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.a(arrayList);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_c = new n(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_c.a(arrayList);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_b = new n(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.a(arrayList);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_e = new n(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.a(arrayList);
|
||
object2 = Lists.newArrayList();
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.forEach(new BiConsumer<String, List<String>>(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
public void a(String string, List<String> list) {
|
||
this.var_java_util_List_a.addAll(list);
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (List)object2);
|
||
}
|
||
});
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_d = new n(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_d.a((Collection<String>)object2);
|
||
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||
fileChooserDescriptor.setShowFileSystemRoots(true);
|
||
fileChooserDescriptor.setTitle("Choose a folder...");
|
||
fileChooserDescriptor.setDescription("choose the path to store file");
|
||
fileChooserDescriptor.setHideIgnored(false);
|
||
fileChooserDescriptor.setRoots(new VirtualFile[]{ProjectUtil.guessProjectDir((Project)this.var_com_intellij_openapi_project_Project_a)});
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.setSize(300, 20);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.addBrowseFolderListener("choose src folder for java model", "choose some", this.var_com_intellij_openapi_project_Project_a, fileChooserDescriptor, new b());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_c.addBrowseFolderListener("choose src folder for mapper", "choose some", this.var_com_intellij_openapi_project_Project_a, fileChooserDescriptor, new b());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_d.addBrowseFolderListener("choose src folder for xml resource", "choose some", this.var_com_intellij_openapi_project_Project_a, fileChooserDescriptor, new b());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.addBrowseFolderListener("choose src folder for service", "choose some", this.var_com_intellij_openapi_project_Project_a, fileChooserDescriptor, new b());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.addBrowseFolderListener("choose src folder for service interface", "choose some", this.var_com_intellij_openapi_project_Project_a, fileChooserDescriptor, new b());
|
||
this.var_com_intellij_openapi_ui_ComboBox_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = (String)r.this.var_com_intellij_openapi_ui_ComboBox_a.getSelectedItem();
|
||
UserPackageAndPathInfoByModule userPackageAndPathInfoByModule = com.ccnode.codegenerator.mybatisGenerator.u.a(string, r.this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, (Map<String, List<String>>)r.this.var_com_intellij_openapi_ui_ComboBox_a, (Map<String, List<String>>)r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b);
|
||
r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.setText(userPackageAndPathInfoByModule.getJavaModelPacakge());
|
||
r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c.setText(userPackageAndPathInfoByModule.getJavaMapperPackage());
|
||
r.this.var_com_ccnode_codegenerator_ab_b_a.setText(userPackageAndPathInfoByModule.getXmlPackage());
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.setText(userPackageAndPathInfoByModule.getJavaModelPath());
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_c.setText(userPackageAndPathInfoByModule.getJavaMapperPath());
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_d.setText(userPackageAndPathInfoByModule.getXmlPath());
|
||
if (userPackageAndPathInfoByModule.getJavaServicePackage() != null) {
|
||
r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d.setText(userPackageAndPathInfoByModule.getJavaServicePackage());
|
||
}
|
||
if (userPackageAndPathInfoByModule.getJavaServicePath() != null) {
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.setText(userPackageAndPathInfoByModule.getJavaServicePath());
|
||
}
|
||
if (userPackageAndPathInfoByModule.getJavaServiceInterfacePackage() != null) {
|
||
r.this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e.setText(userPackageAndPathInfoByModule.getJavaServiceInterfacePackage());
|
||
}
|
||
if (userPackageAndPathInfoByModule.getJavaServiceInterfacePath() != null) {
|
||
r.this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.setText(userPackageAndPathInfoByModule.getJavaServiceInterfacePath());
|
||
}
|
||
}
|
||
});
|
||
ArrayList arrayList2 = Lists.newArrayList();
|
||
arrayList2.add("tk.mybatis.mapper.common.Mapper");
|
||
arrayList2.add("tk.mybatis.mapper.common.BaseMapper");
|
||
arrayList2.add("tk.mybatis.mapper.common.Mapper,tk.mybatis.mapper.common.MySqlMapper");
|
||
arrayList2.add("tk.mybatis.mapper.common.BaseMapper,tk.mybatis.mapper.common.MySqlMapper");
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, (Collection)arrayList2, (boolean)true, null);
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b = new ReferenceEditorComboWithBrowseButton((ActionListener)new a(this, true), null, this.var_com_intellij_openapi_project_Project_a, true, JavaCodeFragment.VisibilityChecker.EVERYTHING_VISIBLE, "mybatis_model_super_recent_key");
|
||
this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a = new ReferenceEditorComboWithBrowseButton((ActionListener)new a(this, false), null, this.var_com_intellij_openapi_project_Project_a, true, JavaCodeFragment.VisibilityChecker.EVERYTHING_VISIBLE, "mybatis_mapper_super_recent_key");
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a != null) {
|
||
List<String> list = this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getMethodNameList();
|
||
this.var_javax_swing_JPanel_b = new k(com.ccnode.codegenerator.ad.A.a("method.name.for.generate.sql"), this.var_com_intellij_openapi_project_Project_a, (List<String>)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b, list);
|
||
} else {
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setEnabled(false);
|
||
}
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_f = new n(this.var_com_intellij_openapi_project_Project_a);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_f.addBrowseFolderListener("choose controller file path", "choose some", this.var_com_intellij_openapi_project_Project_a, fileChooserDescriptor, new b());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_f.a(arrayList);
|
||
}
|
||
|
||
public static String a(ProjectProfile projectProfile, TableGenerateConfig tableGenerateConfig, List<String> list) {
|
||
Object object;
|
||
if (tableGenerateConfig != null && tableGenerateConfig.getModuleName() != null) {
|
||
object = list.iterator();
|
||
while (object.hasNext()) {
|
||
String string = (String)object.next();
|
||
if (!string.equals(tableGenerateConfig.getModuleName())) continue;
|
||
return tableGenerateConfig.getModuleName();
|
||
}
|
||
}
|
||
if ((object = projectProfile.getLastDatabaseCrudChooseModuleName()) != null) {
|
||
for (String string : list) {
|
||
if (!string.equals(object)) continue;
|
||
return object;
|
||
}
|
||
}
|
||
return list.get(0);
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
@Nullable
|
||
public ValidationInfo com_intellij_openapi_ui_ValidationInfo_a() {
|
||
String string;
|
||
if (StringUtils.isBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.getText()) || StringUtils.isBlank((String)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.getText())) {
|
||
return new ValidationInfo("java model src folder and package should not be empty", (JComponent)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_a));
|
||
}
|
||
if (StringUtils.isBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_c.getText()) || StringUtils.isBlank((String)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c.getText())) {
|
||
return new ValidationInfo("java mapper src folder and package should not be empty", (JComponent)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_c));
|
||
}
|
||
if (StringUtils.isBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_d.getText()) || StringUtils.isBlank((String)this.var_com_ccnode_codegenerator_ab_b_a.getText())) {
|
||
return new ValidationInfo("xml resource folder and package should not be empty", (JComponent)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_d));
|
||
}
|
||
if (this.l.isSelected() && (StringUtils.isBlank((String)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d.getText()) || StringUtils.isBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.getText()))) {
|
||
return new ValidationInfo("java service src folder and package should not be empty");
|
||
}
|
||
if (this.B.isSelected() && (StringUtils.isBlank((String)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e.getText()) || StringUtils.isBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.getText()))) {
|
||
return new ValidationInfo("java service interface src folder and package should not be empty");
|
||
}
|
||
if (this.s.isSelected() && this.u.isSelected()) {
|
||
return new ValidationInfo("tk mapper<65><72>example query has confilct, please choose one", (JComponent)this.s);
|
||
}
|
||
if ((this.M.isSelected() || this.N.isSelected()) && this.q.isSelected()) {
|
||
return new ValidationInfo("lombok data or getter setter has conflict with trimString", (JComponent)this.q);
|
||
}
|
||
if (this.S.isSelected() && this.var_com_ccnode_codegenerator_mybatisGenerator_n_f.getText().isEmpty()) {
|
||
return new ValidationInfo("controller folder should not be empty");
|
||
}
|
||
String string2 = this.var_javax_swing_JTextField_d.getText();
|
||
if (StringUtils.isNotBlank((String)string2)) {
|
||
try {
|
||
string = d_0.a("Hello", string2);
|
||
if (string == null) {
|
||
return new ValidationInfo("service ognl name is not correct, please see example");
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
return new ValidationInfo("service ognl name is not correct, please see example");
|
||
}
|
||
}
|
||
if (StringUtils.isNotBlank((String)(string = this.var_javax_swing_JTextField_e.getText()))) {
|
||
try {
|
||
String string3 = d_0.a("Hello", string);
|
||
if (string3 == null) {
|
||
return new ValidationInfo("service interface ognl name is not correct, please see example");
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
return new ValidationInfo("service interface ognl name is not correct, please see example");
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public boolean boolean_a() {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_o_a = new o();
|
||
this.a(this.var_com_ccnode_codegenerator_mybatisGenerator_o_a);
|
||
if (!this.p.isSelected()) {
|
||
int n2 = Messages.showOkCancelDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"<22><><C9><FA>ע<C9><D7A2>û<CD><C3BB>ѡ<D0>У<D6><D0A3>Ժ<D2><D4BA><F3><CA>ݿ<BE><DDBF><E2><CC><ED><BC>ֶκ<D6B6> <20><><D6><D8><D0><C2><C9>ɵĻ<C9B5> xml<6D><6C><B2>ܺϲ<DCBA> <20><>ȷ<EB><C8B7>", (String)"gen comment not selected", null);
|
||
return n2 == 0;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
private void a(o o2) {
|
||
o2.b(this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b.getText());
|
||
o2.c(this.var_com_ccnode_codegenerator_mybatisGenerator_n_a.getText());
|
||
o2.a(this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a.getText());
|
||
o2.a(this.q.isSelected());
|
||
o2.d(this.var_com_ccnode_codegenerator_ab_b_a.getText());
|
||
o2.e(this.var_com_ccnode_codegenerator_mybatisGenerator_n_d.getText());
|
||
o2.f(this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c.getText());
|
||
o2.g(this.var_com_ccnode_codegenerator_mybatisGenerator_n_c.getText());
|
||
o2.b(this.w.isSelected());
|
||
o2.R(this.var_javax_swing_JCheckBox_f.isSelected());
|
||
o2.c(this.s.isSelected());
|
||
o2.d(this.p.isSelected());
|
||
o2.e(this.t.isSelected());
|
||
o2.E(this.var_javax_swing_JTextField_h.getText());
|
||
o2.N(this.var_javax_swing_JCheckBox_b.isSelected());
|
||
o2.A(this.var_javax_swing_JTextField_d.getText());
|
||
o2.B(this.var_javax_swing_JTextField_e.getText());
|
||
o2.D(this.M.isSelected());
|
||
o2.Q(this.var_javax_swing_JCheckBox_e.isSelected());
|
||
o2.y(this.var_javax_swing_JTextArea_a.getText());
|
||
o2.E(this.N.isSelected());
|
||
o2.F(this.O.isSelected());
|
||
o2.G(this.Q.isSelected());
|
||
o2.H(this.P.isSelected());
|
||
o2.f(this.m.isSelected());
|
||
o2.g(this.n.isSelected());
|
||
o2.h(this.r.isSelected());
|
||
o2.i(this.x.isSelected());
|
||
o2.v(this.R.isSelected());
|
||
o2.j(this.z.isSelected());
|
||
o2.T(this.var_javax_swing_JCheckBox_h.isSelected());
|
||
o2.U(this.var_javax_swing_JCheckBox_i.isSelected());
|
||
o2.V(this.j.isSelected());
|
||
o2.k(this.y.isSelected());
|
||
o2.l(this.l.isSelected());
|
||
o2.q(this.B.isSelected());
|
||
o2.x(this.var_javax_swing_JTextField_i.getText());
|
||
o2.z(this.var_javax_swing_JTextField_c.getText());
|
||
o2.C(this.var_javax_swing_JTextField_f.getText());
|
||
o2.D(this.var_javax_swing_JTextField_g.getText());
|
||
if (StringUtils.isNotBlank((String)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d.getText())) {
|
||
o2.j(this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d.getText());
|
||
}
|
||
if (StringUtils.isNotBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.getText())) {
|
||
o2.k(this.var_com_ccnode_codegenerator_mybatisGenerator_n_b.getText());
|
||
}
|
||
if (StringUtils.isNotBlank((String)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e.getText())) {
|
||
o2.l(this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e.getText());
|
||
}
|
||
if (StringUtils.isNotBlank((String)this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.getText())) {
|
||
o2.m(this.var_com_ccnode_codegenerator_mybatisGenerator_n_e.getText());
|
||
}
|
||
o2.m(this.u.isSelected());
|
||
if (this.u.isSelected()) {
|
||
o2.h(this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText());
|
||
}
|
||
o2.n(this.v.isSelected());
|
||
o2.S(this.var_javax_swing_JCheckBox_g.isSelected());
|
||
o2.o(this.o.isSelected());
|
||
o2.i((String)this.var_com_intellij_openapi_ui_ComboBox_a.getSelectedItem());
|
||
o2.p(this.A.isSelected());
|
||
if (StringUtils.isNotBlank((String)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b.getText())) {
|
||
o2.n(this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b.getText());
|
||
}
|
||
if (StringUtils.isNotBlank((String)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getText())) {
|
||
o2.o(this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getText());
|
||
}
|
||
o2.r(this.C.isSelected());
|
||
o2.s(this.D.isSelected());
|
||
o2.t(this.E.isSelected());
|
||
o2.u(this.I.isSelected());
|
||
o2.w(this.F.isSelected());
|
||
o2.x(this.G.isSelected());
|
||
o2.y(this.H.isSelected());
|
||
o2.z(this.var_com_ccnode_codegenerator_myconfigurable_Profile_a.getIfTestStringNullAndEmpty());
|
||
o2.A(this.J.isSelected());
|
||
o2.P(this.var_javax_swing_JCheckBox_d.isSelected());
|
||
o2.B(this.K.isSelected());
|
||
o2.C(this.L.isSelected());
|
||
o2.O(this.var_javax_swing_JCheckBox_c.isSelected());
|
||
o2.W(this.k.isSelected());
|
||
o2.K(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
o2.v(this.var_javax_swing_JTextField_a.getText());
|
||
o2.w(this.var_javax_swing_JTextField_b.getText());
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
ArrayList arrayList2 = Lists.newArrayList();
|
||
arrayList.addAll(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMethodNameForProjectList());
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a != null) {
|
||
k k2 = (k)((Object)ObjectUtils.tryCast((Object)this.var_javax_swing_JPanel_b, k.class));
|
||
List<String> list = k2.b();
|
||
for (String string : list) {
|
||
if (!arrayList.contains(string)) {
|
||
arrayList.add(string);
|
||
}
|
||
arrayList2.add(string);
|
||
}
|
||
}
|
||
o2.a(arrayList2);
|
||
o2.b(arrayList);
|
||
o2.s((String)this.var_javax_swing_JComboBox_a.getSelectedItem());
|
||
o2.J(this.S.isSelected());
|
||
o2.t(this.var_com_ccnode_codegenerator_mybatisGenerator_n_f.getText());
|
||
o2.u(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getControllerTemplateString());
|
||
}
|
||
|
||
public o com_ccnode_codegenerator_mybatisGenerator_o_a() {
|
||
return this.var_com_ccnode_codegenerator_mybatisGenerator_o_a;
|
||
}
|
||
|
||
private void c() {
|
||
this.b();
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(7, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(0, 0, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel2, new GridConstraints(0, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
jLabel.setText("module:");
|
||
jPanel2.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel2.add((Component)this.var_com_intellij_openapi_ui_ComboBox_a, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel3, new GridConstraints(1, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel3.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "basefiles"), 0, 0, null, null));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel3.add((Component)jPanel4, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "java.model.package"));
|
||
jPanel4.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_b, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "java.model.src.folder"));
|
||
jPanel4.add((Component)jLabel3, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_a), new GridConstraints(1, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
this.a(jLabel4, this.a("i18n/i18n", "java.mapper.package"));
|
||
jPanel4.add((Component)jLabel4, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c, new GridConstraints(2, 1, 1, 1, 8, 1, 3, 3, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
this.a(jLabel5, this.a("i18n/i18n", "java.mapper.src.folder"));
|
||
jPanel4.add((Component)jLabel5, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_c), new GridConstraints(3, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel6 = new JLabel();
|
||
this.a(jLabel6, this.a("i18n/i18n", "mapper.xml.package"));
|
||
jPanel4.add((Component)jLabel6, new GridConstraints(4, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)((Object)this.var_com_ccnode_codegenerator_ab_b_a), new GridConstraints(4, 1, 1, 1, 8, 1, 3, 3, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel7 = new JLabel();
|
||
this.a(jLabel7, this.a("i18n/i18n", "xml.resources.folder"));
|
||
jPanel4.add((Component)jLabel7, new GridConstraints(5, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_d), new GridConstraints(5, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JTabbedPane_a = new JTabbedPane();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JTabbedPane_a, new GridConstraints(5, 0, 1, 3, 0, 3, 3, 3, null, new Dimension(200, 200), null, 0, false));
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("service", jPanel5);
|
||
JPanel jPanel6 = new JPanel();
|
||
jPanel6.setLayout((LayoutManager)new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel5.add((Component)jPanel6, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel6.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "generateservice"), 0, 0, null, null));
|
||
JLabel jLabel8 = new JLabel();
|
||
jLabel8.setText("java service package");
|
||
jPanel6.add((Component)jLabel8, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.l = new JCheckBox();
|
||
this.l.setText("generateService");
|
||
jPanel6.add((Component)this.l, new GridConstraints(1, 0, 1, 3, 8, 0, 3, 0, null, null, null, 0, false));
|
||
jPanel6.add((Component)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_b), new GridConstraints(3, 2, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel9 = new JLabel();
|
||
jLabel9.setText("java service src folder");
|
||
jPanel6.add((Component)jLabel9, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel6.add((Component)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_d, new GridConstraints(2, 2, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel10 = new JLabel();
|
||
this.a(jLabel10, this.a("i18n/i18n", "servicename.optional.default.is.when.xxservice.ognl"));
|
||
jPanel6.add((Component)jLabel10, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_d = new JTextField();
|
||
jPanel6.add((Component)this.var_javax_swing_JTextField_d, new GridConstraints(0, 2, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JButton_g = new JButton();
|
||
this.a(this.var_javax_swing_JButton_g, this.a("text/BatsLogBundle", "nameexample"));
|
||
jPanel6.add((Component)this.var_javax_swing_JButton_g, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel5.add((Component)spacer, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel7 = new JPanel();
|
||
jPanel7.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("service interface", jPanel7);
|
||
JPanel jPanel8 = new JPanel();
|
||
jPanel8.setLayout((LayoutManager)new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel7.add((Component)jPanel8, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel8.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "generateserviceinterface"), 0, 0, null, null));
|
||
this.B = new JCheckBox();
|
||
this.B.setText("generateServiceInterface");
|
||
jPanel8.add((Component)this.B, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel11 = new JLabel();
|
||
jLabel11.setText("service interface package");
|
||
jPanel8.add((Component)jLabel11, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel12 = new JLabel();
|
||
jLabel12.setText("service interface src folder");
|
||
jPanel8.add((Component)jLabel12, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel8.add((Component)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_e), new GridConstraints(3, 2, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel8.add((Component)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_e, new GridConstraints(2, 2, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer2 = new Spacer();
|
||
jPanel8.add((Component)spacer2, new GridConstraints(1, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel13 = new JLabel();
|
||
this.a(jLabel13, this.a("i18n/i18n", "service.interface.name.use.ognl.name"));
|
||
jPanel8.add((Component)jLabel13, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_e = new JTextField();
|
||
jPanel8.add((Component)this.var_javax_swing_JTextField_e, new GridConstraints(0, 2, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JButton_i = new JButton();
|
||
this.a(this.var_javax_swing_JButton_i, this.a("text/BatsLogBundle", "nameexample"));
|
||
jPanel8.add((Component)this.var_javax_swing_JButton_i, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer3 = new Spacer();
|
||
jPanel7.add((Component)spacer3, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel9 = new JPanel();
|
||
jPanel9.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("lombok", jPanel9);
|
||
JPanel jPanel10 = new JPanel();
|
||
jPanel10.setLayout((LayoutManager)new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel9.add((Component)jPanel10, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel10.setBorder(BorderFactory.createTitledBorder(null, "lombok", 0, 0, null, null));
|
||
this.M = new JCheckBox();
|
||
this.M.setText("@Data");
|
||
jPanel10.add((Component)this.M, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.N = new JCheckBox();
|
||
this.N.setText("@GetterSetter");
|
||
jPanel10.add((Component)this.N, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.O = new JCheckBox();
|
||
this.O.setText("Builder");
|
||
jPanel10.add((Component)this.O, new GridConstraints(0, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.P = new JCheckBox();
|
||
this.P.setText("@NoArgsConstructor");
|
||
jPanel10.add((Component)this.P, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.Q = new JCheckBox();
|
||
this.Q.setText("@AllArgsConstructor");
|
||
jPanel10.add((Component)this.Q, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_e = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_e, this.a("i18n/i18n", "customized.annotation"));
|
||
jPanel10.add((Component)this.var_javax_swing_JCheckBox_e, new GridConstraints(2, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
jPanel10.add((Component)this.var_javax_swing_JTextArea_a, new GridConstraints(2, 1, 1, 1, 0, 3, 4, 4, null, new Dimension(150, 50), null, 0, false));
|
||
Spacer spacer4 = new Spacer();
|
||
jPanel9.add((Component)spacer4, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel11 = new JPanel();
|
||
jPanel11.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "baseclass"), jPanel11);
|
||
JPanel jPanel12 = new JPanel();
|
||
jPanel12.setLayout((LayoutManager)new GridLayoutManager(3, 19, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel11.add((Component)jPanel12, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel12.setBorder(BorderFactory.createTitledBorder(null, "superClass", 0, 0, null, null));
|
||
JLabel jLabel14 = new JLabel();
|
||
this.a(jLabel14, this.a("i18n/i18n", "modelsuperclass"));
|
||
jPanel12.add((Component)jLabel14, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel15 = new JLabel();
|
||
this.a(jLabel15, this.a("i18n/i18n", "mappersuperclass"));
|
||
jPanel12.add((Component)jLabel15, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel12.add((Component)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a, new GridConstraints(2, 1, 1, 18, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel12.add((Component)this.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b, new GridConstraints(1, 1, 1, 18, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel16 = new JLabel();
|
||
this.a(jLabel16, this.a("i18n/i18n", "use.t.for.entity.class.generic.like.basemapper.t"));
|
||
jPanel12.add((Component)jLabel16, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer5 = new Spacer();
|
||
jPanel11.add((Component)spacer5, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel13 = new JPanel();
|
||
jPanel13.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("tkmapper", jPanel13);
|
||
JPanel jPanel14 = new JPanel();
|
||
jPanel14.setLayout((LayoutManager)new GridLayoutManager(2, 16, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel13.add((Component)jPanel14, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel14.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "tkmappercofig"), 0, 0, null, null));
|
||
this.u = new JCheckBox();
|
||
this.a(this.u, this.a("i18n/i18n", "tk.mapper"));
|
||
jPanel14.add((Component)this.u, new GridConstraints(0, 0, 1, 16, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel17 = new JLabel();
|
||
this.a(jLabel17, this.a("i18n/i18n", "basemapper"));
|
||
jPanel14.add((Component)jLabel17, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
jPanel14.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_a, new GridConstraints(1, 1, 1, 15, 0, 3, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer6 = new Spacer();
|
||
jPanel13.add((Component)spacer6, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel15 = new JPanel();
|
||
jPanel15.setLayout((LayoutManager)new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "customize.method"), jPanel15);
|
||
jPanel15.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "defaultstatements"), 0, 0, null, null));
|
||
this.D = new JCheckBox();
|
||
this.a(this.D, this.a("i18n/i18n", "insert"));
|
||
jPanel15.add((Component)this.D, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.E = new JCheckBox();
|
||
this.a(this.E, this.a("i18n/i18n", "insertselective"));
|
||
jPanel15.add((Component)this.E, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.F = new JCheckBox();
|
||
this.a(this.F, this.a("i18n/i18n", "selectprimarykey"));
|
||
jPanel15.add((Component)this.F, new GridConstraints(0, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.G = new JCheckBox();
|
||
this.a(this.G, this.a("i18n/i18n", "updatebyprimarykey"));
|
||
jPanel15.add((Component)this.G, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.H = new JCheckBox();
|
||
this.a(this.H, this.a("i18n/i18n", "updatebyprimarykeyselective"));
|
||
jPanel15.add((Component)this.H, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.I = new JCheckBox();
|
||
this.a(this.I, this.a("i18n/i18n", "deletebyprimaykey"));
|
||
jPanel15.add((Component)this.I, new GridConstraints(1, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer7 = new Spacer();
|
||
jPanel15.add((Component)spacer7, new GridConstraints(2, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel16 = new JPanel();
|
||
jPanel16.setLayout((LayoutManager)new GridLayoutManager(6, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "mybatisplus"), jPanel16);
|
||
this.v = new JCheckBox();
|
||
this.a(this.v, this.a("i18n/i18n", "mybatisplus3"));
|
||
jPanel16.add((Component)this.v, new GridConstraints(1, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer8 = new Spacer();
|
||
jPanel16.add((Component)spacer8, new GridConstraints(5, 1, 1, 2, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.K = new JCheckBox();
|
||
this.a(this.K, this.a("i18n/i18n", "mybatisplus2"));
|
||
jPanel16.add((Component)this.K, new GridConstraints(1, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.L = new JCheckBox();
|
||
this.L.setSelected(false);
|
||
this.a(this.L, this.a("i18n/i18n", "staticcolumnfields"));
|
||
jPanel16.add((Component)this.L, new GridConstraints(2, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel17 = new JPanel();
|
||
jPanel17.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel16.add((Component)jPanel17, new GridConstraints(3, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel18 = new JLabel();
|
||
jLabel18.setText("idType");
|
||
jPanel17.add((Component)jLabel18, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
DefaultComboBoxModel<String> defaultComboBoxModel = new DefaultComboBoxModel<String>();
|
||
defaultComboBoxModel.addElement("INPUT");
|
||
defaultComboBoxModel.addElement("AUTO");
|
||
defaultComboBoxModel.addElement("NONE");
|
||
defaultComboBoxModel.addElement("ASSIGN_ID");
|
||
defaultComboBoxModel.addElement("ASSIGN_UUID");
|
||
defaultComboBoxModel.addElement("UUID");
|
||
defaultComboBoxModel.addElement("ID_WORKER");
|
||
defaultComboBoxModel.addElement("ID_WORKER_STR");
|
||
this.var_javax_swing_JComboBox_a.setModel(defaultComboBoxModel);
|
||
jPanel17.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_c = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_c, this.a("i18n/i18n", "generateupdateseleciveandinsertselective"));
|
||
jPanel16.add((Component)this.var_javax_swing_JCheckBox_c, new GridConstraints(4, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_g = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_g, this.a("i18n/i18n", "add.createtime.updatetime.fieldfill"));
|
||
jPanel16.add((Component)this.var_javax_swing_JCheckBox_g, new GridConstraints(4, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel19 = new JLabel();
|
||
jLabel19.setForeground(new Color(-65536));
|
||
this.a(jLabel19, this.a("i18n/i18n", "mybatispluswarning"));
|
||
jPanel16.add((Component)jLabel19, new GridConstraints(0, 0, 1, 3, 0, 1, 0, 0, null, null, null, 0, false));
|
||
this.k = new JCheckBox();
|
||
this.k.setText("generateUpdateByPrimaryKey");
|
||
jPanel16.add((Component)this.k, new GridConstraints(5, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel18 = new JPanel();
|
||
jPanel18.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "methodnamesql"), jPanel18);
|
||
jPanel18.add((Component)this.var_javax_swing_JPanel_b, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel19 = new JPanel();
|
||
jPanel19.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "moresqlstatement"), jPanel19);
|
||
JPanel jPanel20 = new JPanel();
|
||
jPanel20.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel19.add((Component)jPanel20, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel20.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "moresqlstatement"), 0, 0, null, null));
|
||
this.x = new JCheckBox();
|
||
this.a(this.x, this.a("i18n/i18n", "updatebatch.mysqlandoracle"));
|
||
jPanel20.add((Component)this.x, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.z = new JCheckBox();
|
||
this.a(this.z, this.a("i18n/i18n", "batchinsert.mysql.and.sqlserver"));
|
||
jPanel20.add((Component)this.z, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.y = new JCheckBox();
|
||
this.a(this.y, this.a("i18n/i18n", "insertonduplicate.mysql"));
|
||
jPanel20.add((Component)this.y, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.R = new JCheckBox();
|
||
this.a(this.R, this.a("i18n/i18n", "updatebatchselective.mysqlandoracle"));
|
||
jPanel20.add((Component)this.R, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_h = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_h.setText("deleteByPrimaryKeyIn");
|
||
jPanel20.add((Component)this.var_javax_swing_JCheckBox_h, new GridConstraints(2, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_i = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_i.setText("updateBatchUseMutliQuery(allowMultiQueries=true)");
|
||
jPanel20.add((Component)this.var_javax_swing_JCheckBox_i, new GridConstraints(2, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.j = new JCheckBox();
|
||
this.j.setText("batchInsertSelectiveUseDefaultForNull(mysql column should have default valule)");
|
||
jPanel20.add((Component)this.j, new GridConstraints(3, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer9 = new Spacer();
|
||
jPanel19.add((Component)spacer9, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel21 = new JPanel();
|
||
jPanel21.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("controller", jPanel21);
|
||
JPanel jPanel22 = new JPanel();
|
||
jPanel22.setLayout(new BorderLayout(0, 0));
|
||
jPanel21.add((Component)jPanel22, new GridConstraints(0, 0, 1, 2, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel23 = new JPanel();
|
||
jPanel23.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel22.add((Component)jPanel23, "North");
|
||
this.S = new JCheckBox();
|
||
this.S.setText("generateController(not stable)");
|
||
jPanel23.add((Component)this.S, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer10 = new Spacer();
|
||
jPanel23.add((Component)spacer10, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel20 = new JLabel();
|
||
jLabel20.setText("controller src folder");
|
||
jPanel23.add((Component)jLabel20, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel23.add((Component)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_n_f), new GridConstraints(1, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "edit.template"));
|
||
jPanel23.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(3, 0, 1, 1, 8, 0, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel21 = new JLabel();
|
||
jLabel21.setText("controller package");
|
||
jPanel23.add((Component)jLabel21, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel23.add((Component)this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a, new GridConstraints(2, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel24 = new JPanel();
|
||
jPanel24.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "migratetotemplate"), jPanel24);
|
||
JPanel jPanel25 = new JPanel();
|
||
jPanel25.setLayout((LayoutManager)new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel24.add((Component)jPanel25, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel25.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "unstable"), 0, 0, null, null));
|
||
this.var_javax_swing_JButton_e = new JButton();
|
||
this.a(this.var_javax_swing_JButton_e, this.a("i18n/i18n", "template.data"));
|
||
jPanel25.add((Component)this.var_javax_swing_JButton_e, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer11 = new Spacer();
|
||
jPanel25.add((Component)spacer11, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_f = new JButton();
|
||
this.var_javax_swing_JButton_f.setText("install easyCodeMybatisCodeHelper plugin");
|
||
jPanel25.add((Component)this.var_javax_swing_JButton_f, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setText("doc");
|
||
jPanel25.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(0, 2, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel26 = new JPanel();
|
||
jPanel26.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab(this.a("i18n/i18n", "less.used.options"), jPanel26);
|
||
JLabel jLabel22 = new JLabel();
|
||
this.a(jLabel22, this.a("i18n/i18n", "mapper.prefix"));
|
||
jPanel26.add((Component)jLabel22, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer12 = new Spacer();
|
||
jPanel26.add((Component)spacer12, new GridConstraints(3, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_f = new JTextField();
|
||
jPanel26.add((Component)this.var_javax_swing_JTextField_f, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel23 = new JLabel();
|
||
this.a(jLabel23, this.a("i18n/i18n", "xml.file.nameprefix"));
|
||
jPanel26.add((Component)jLabel23, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_g = new JTextField();
|
||
this.var_javax_swing_JTextField_g.setText("");
|
||
jPanel26.add((Component)this.var_javax_swing_JTextField_g, new GridConstraints(1, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel24 = new JLabel();
|
||
this.a(jLabel24, this.a("i18n/i18n", "globalignorecolumns.use.to.seprate"));
|
||
jPanel26.add((Component)jLabel24, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_h = new JTextField();
|
||
jPanel26.add((Component)this.var_javax_swing_JTextField_h, new GridConstraints(2, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel27 = new JPanel();
|
||
jPanel27.setLayout((LayoutManager)new GridLayoutManager(5, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel27, new GridConstraints(2, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel27.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "config"), 0, 0, null, null));
|
||
this.m = new JCheckBox();
|
||
this.a(this.m, this.a("i18n/i18n", "tostring"));
|
||
jPanel27.add((Component)this.m, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.n = new JCheckBox();
|
||
this.a(this.n, this.a("i18n/i18n", "equalhashcode"));
|
||
jPanel27.add((Component)this.n, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.o = new JCheckBox();
|
||
this.a(this.o, this.a("i18n/i18n", "mapperannotation"));
|
||
jPanel27.add((Component)this.o, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.p = new JCheckBox();
|
||
this.p.setSelected(true);
|
||
this.a(this.p, this.a("i18n/i18n", "generatecomment"));
|
||
jPanel27.add((Component)this.p, new GridConstraints(1, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.r = new JCheckBox();
|
||
this.a(this.r, this.a("i18n/i18n", "serializable"));
|
||
jPanel27.add((Component)this.r, new GridConstraints(2, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.s = new JCheckBox();
|
||
this.a(this.s, this.a("i18n/i18n", "examplequery"));
|
||
jPanel27.add((Component)this.s, new GridConstraints(2, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.t = new JCheckBox();
|
||
this.a(this.t, this.a("i18n/i18n", "swaggerannotation"));
|
||
jPanel27.add((Component)this.t, new GridConstraints(2, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.q = new JCheckBox();
|
||
this.a(this.q, this.a("i18n/i18n", "trimstring"));
|
||
jPanel27.add((Component)this.q, new GridConstraints(1, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.w = new JCheckBox();
|
||
this.a(this.w, this.a("i18n/i18n", "addschemaname"));
|
||
jPanel27.add((Component)this.w, new GridConstraints(3, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.A = new JCheckBox();
|
||
this.a(this.A, this.a("i18n/i18n", "nojdbctype"));
|
||
jPanel27.add((Component)this.A, new GridConstraints(0, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.C = new JCheckBox();
|
||
this.a(this.C, this.a("i18n/i18n", "p3ccomment"));
|
||
jPanel27.add((Component)this.C, new GridConstraints(3, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.J = new JCheckBox();
|
||
this.a(this.J, this.a("i18n/i18n", "checkblobcolumn"));
|
||
jPanel27.add((Component)this.J, new GridConstraints(3, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_b = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_b.setText("openapi swagger3");
|
||
jPanel27.add((Component)this.var_javax_swing_JCheckBox_b, new GridConstraints(4, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_d = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_d.setText("javax validation(@NotNull@Max)");
|
||
jPanel27.add((Component)this.var_javax_swing_JCheckBox_d, new GridConstraints(4, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_f = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_f, this.a("i18n/i18n", "jakarta.annotation"));
|
||
jPanel27.add((Component)this.var_javax_swing_JCheckBox_f, new GridConstraints(4, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel28 = new JPanel();
|
||
jPanel28.setLayout((LayoutManager)new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel28, new GridConstraints(4, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", "removeisprefix"));
|
||
jPanel28.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel25 = new JLabel();
|
||
this.a(jLabel25, this.a("i18n/i18n", "regex"));
|
||
jPanel28.add((Component)jLabel25, new GridConstraints(0, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel28.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 2, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel26 = new JLabel();
|
||
this.a(jLabel26, this.a("i18n/i18n", "replacement"));
|
||
jPanel28.add((Component)jLabel26, new GridConstraints(0, 3, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
jPanel28.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(0, 4, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel29 = new JPanel();
|
||
jPanel29.setLayout((LayoutManager)new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel29, new GridConstraints(6, 0, 1, 3, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.a(this.var_javax_swing_JButton_b, this.a("i18n/i18n", "exportconfigtojson"));
|
||
jPanel29.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer13 = new Spacer();
|
||
jPanel29.add((Component)spacer13, new GridConstraints(0, 4, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.a(this.var_javax_swing_JButton_c, this.a("i18n/i18n", "importconfigfromjson"));
|
||
jPanel29.add((Component)this.var_javax_swing_JButton_c, new GridConstraints(0, 2, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_d = new JButton();
|
||
this.a(this.var_javax_swing_JButton_d, this.a("i18n/i18n", "savecurrentconfig"));
|
||
jPanel29.add((Component)this.var_javax_swing_JButton_d, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_h = new JButton();
|
||
this.a(this.var_javax_swing_JButton_h, this.a("i18n/i18n", "table.cache"));
|
||
jPanel29.add((Component)this.var_javax_swing_JButton_h, new GridConstraints(0, 3, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer14 = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer14, new GridConstraints(3, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel30 = new JPanel();
|
||
jPanel30.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel30, new GridConstraints(3, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel27 = new JLabel();
|
||
this.a(jLabel27, this.a("i18n/i18n", "mapper.suffix"));
|
||
jPanel30.add((Component)jLabel27, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_i = new JTextField();
|
||
this.var_javax_swing_JTextField_i.setText("");
|
||
jPanel30.add((Component)this.var_javax_swing_JTextField_i, new GridConstraints(0, 1, 1, 1, 8, 0, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel28 = new JLabel();
|
||
this.a(jLabel28, this.a("i18n/i18n", "xml.suffix.optional.default.is.same.to.mapper.suffix"));
|
||
jPanel30.add((Component)jLabel28, new GridConstraints(0, 2, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
jPanel30.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(0, 3, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = this.getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public PackageNameReferenceEditorCombo com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a() {
|
||
return this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c;
|
||
}
|
||
|
||
public void a(PackageNameReferenceEditorCombo packageNameReferenceEditorCombo) {
|
||
this.var_com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_c = packageNameReferenceEditorCombo;
|
||
}
|
||
|
||
public n com_ccnode_codegenerator_mybatisGenerator_n_a() {
|
||
return this.var_com_ccnode_codegenerator_mybatisGenerator_n_c;
|
||
}
|
||
|
||
public void a(n n2) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_n_c = n2;
|
||
}
|
||
|
||
private static void a(String string, @NotNull Project project, String string2, String string3) {
|
||
EditorFactory editorFactory = EditorFactory.getInstance();
|
||
Document document = editorFactory.createDocument((CharSequence)string);
|
||
document.putUserData(FileTemplateManager.DEFAULT_TEMPLATE_PROPERTIES, (Object)FileTemplateManager.getInstance((Project)project).getDefaultProperties());
|
||
Editor editor = editorFactory.createViewer(document, project);
|
||
com.ccnode.codegenerator.mybatisGenerator.d.a.a(editor);
|
||
((EditorEx)editor).setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(project, string2));
|
||
DialogBuilder dialogBuilder = new DialogBuilder(project);
|
||
dialogBuilder.setTitle(string3);
|
||
JComponent jComponent = editor.getComponent();
|
||
jComponent.setPreferredSize((Dimension)new JBDimension(800, 600));
|
||
dialogBuilder.setCenterPanel(jComponent);
|
||
dialogBuilder.addCloseButton();
|
||
dialogBuilder.addDisposable(() -> {
|
||
editorFactory.releaseEditor(editor);
|
||
dialogBuilder.dispose();
|
||
});
|
||
dialogBuilder.show();
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
|
||
private static class b
|
||
implements TextComponentAccessor<TextFieldWithAutoCompletion<String>> {
|
||
private b() {
|
||
}
|
||
|
||
public String a(TextFieldWithAutoCompletion textFieldWithAutoCompletion) {
|
||
String string = textFieldWithAutoCompletion.getText();
|
||
return string.replace("\\", "/");
|
||
}
|
||
|
||
public void a(TextFieldWithAutoCompletion textFieldWithAutoCompletion, @NotNull String string) {
|
||
textFieldWithAutoCompletion.setText(string.replace("\\", "/"));
|
||
}
|
||
|
||
public /* synthetic */ void setText(Component component, @NotNull String string) {
|
||
this.a((TextFieldWithAutoCompletion)component, string);
|
||
}
|
||
|
||
public /* synthetic */ String getText(Component component) {
|
||
return this.a((TextFieldWithAutoCompletion)component);
|
||
}
|
||
}
|
||
|
||
private class a
|
||
implements ActionListener {
|
||
private boolean var_boolean_a;
|
||
final /* synthetic */ r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
|
||
public a(r r2, boolean bl) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2;
|
||
this.var_boolean_a = bl;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
TreeClassChooserFactory treeClassChooserFactory = TreeClassChooserFactory.getInstance((Project)this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_openapi_project_Project_a);
|
||
TreeClassChooser treeClassChooser = treeClassChooserFactory.createAllProjectScopeChooser("Choose Super Class");
|
||
treeClassChooser.showDialog();
|
||
PsiClass psiClass = treeClassChooser.getSelected();
|
||
if (psiClass != null) {
|
||
String string = psiClass.getQualifiedName();
|
||
if (this.var_boolean_a) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b.appendItem(string);
|
||
((EditorComboBox)this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_b.getChildComponent()).setSelectedItem((Object)string);
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.appendItem(string);
|
||
((EditorComboBox)this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.var_com_intellij_ui_ReferenceEditorComboWithBrowseButton_a.getChildComponent()).setSelectedItem((Object)string);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.CodeInsightUtil
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.ide.highlighter.XmlFileType
|
||
* com.intellij.ide.impl.ProjectUtil
|
||
* com.intellij.openapi.fileEditor.FileDocumentManager
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.options.ShowSettingsUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.project.ProjectUtil
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.DialogWrapper$IdeModalityType
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.ValidationInfo
|
||
* com.intellij.openapi.vfs.VfsUtil
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.openapi.vfs.VirtualFileManager
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
* com.intellij.ui.components.JBScrollPane
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* kotlin.text.Charsets
|
||
* org.apache.commons.io.FileUtils
|
||
* org.apache.commons.io.IOUtils
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.mybatis.generator.exception.InvalidConfigurationException
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.F.c;
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.ad.i;
|
||
import com.ccnode.codegenerator.ad.z;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.i.b_0;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.b;
|
||
import com.ccnode.codegenerator.mybatisGenerator.h;
|
||
import com.ccnode.codegenerator.mybatisGenerator.l;
|
||
import com.ccnode.codegenerator.mybatisGenerator.o;
|
||
import com.ccnode.codegenerator.mybatisGenerator.p;
|
||
import com.ccnode.codegenerator.mybatisGenerator.r;
|
||
import com.ccnode.codegenerator.mybatisGenerator.t;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.mybatisGenerator.y;
|
||
import com.ccnode.codegenerator.myconfigurable.MyColumnOverride;
|
||
import com.ccnode.codegenerator.myconfigurable.MyIgnoredColumn;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.myconfigurable.TableGenerateConfig;
|
||
import com.ccnode.codegenerator.y.a_0;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.CodeInsightUtil;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.ide.highlighter.XmlFileType;
|
||
import com.intellij.ide.impl.ProjectUtil;
|
||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.options.ShowSettingsUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.ValidationInfo;
|
||
import com.intellij.openapi.vfs.VfsUtil;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import com.intellij.ui.components.JBScrollPane;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Desktop;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.File;
|
||
import java.io.FileInputStream;
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.lang.reflect.Method;
|
||
import java.nio.charset.Charset;
|
||
import java.nio.file.Files;
|
||
import java.nio.file.Path;
|
||
import java.nio.file.attribute.FileAttribute;
|
||
import java.sql.SQLException;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.ResourceBundle;
|
||
import java.util.UUID;
|
||
import java.util.stream.Collectors;
|
||
import javax.swing.AbstractAction;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.Action;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextField;
|
||
import kotlin.text.Charsets;
|
||
import org.apache.commons.io.FileUtils;
|
||
import org.apache.commons.io.IOUtils;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.mybatis.generator.exception.InvalidConfigurationException;
|
||
|
||
public class s
|
||
extends DialogWrapper {
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_b;
|
||
private TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_c;
|
||
private LinkLabel var_com_intellij_ui_components_labels_LinkLabel_b;
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JLabel var_javax_swing_JLabel_a;
|
||
private JCheckBox var_javax_swing_JCheckBox_b;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_a;
|
||
private AbstractAction var_javax_swing_AbstractAction_a;
|
||
private AbstractAction var_javax_swing_AbstractAction_b;
|
||
private AbstractAction var_javax_swing_AbstractAction_c;
|
||
private AbstractAction d;
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_mybatisGenerator_a__a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static com.ccnode.codegenerator.F.a var_com_ccnode_codegenerator_F_a_a;
|
||
private String var_java_lang_String_a;
|
||
private TableGenerateConfig var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a;
|
||
private ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
private Profile var_com_ccnode_codegenerator_myconfigurable_Profile_a;
|
||
private r var_com_ccnode_codegenerator_mybatisGenerator_r_a;
|
||
private com.ccnode.codegenerator.mybatisGenerator.a.a var_com_ccnode_codegenerator_mybatisGenerator_a_a_a;
|
||
private t var_com_ccnode_codegenerator_mybatisGenerator_t_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public s(String string, Project project, com.ccnode.codegenerator.mybatisGenerator.a.a a2) {
|
||
super(project, true, DialogWrapper.IdeModalityType.IDE);
|
||
t t2;
|
||
this.setTitle("run mybatis generator for " + string);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a = a2;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(project);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_Profile_a = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
this.getRootPane().setDefaultButton(null);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_t_a = t2 = this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.com_ccnode_codegenerator_mybatisGenerator_t_a(string);
|
||
this.var_javax_swing_JTextField_a = t2.b();
|
||
TableGenerateConfig tableGenerateConfig = u.a(string, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.b());
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a = (TableGenerateConfig)z.a().deepClone((Object)tableGenerateConfig);
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUseActualColumnName() == null) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.setUseActualColumnName(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getUseActualColumnNames());
|
||
}
|
||
List<a> list = y.a((List<a>)((Object)this.var_javax_swing_JTextField_a), this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUseActualColumnName());
|
||
List<a> list2 = y.a(list, this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
b b2 = y.a(list, list2, com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a());
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.setColumnOverrideList(b2.a());
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.setIgnoredColums(b2.b());
|
||
this.b();
|
||
this.var_javax_swing_JCheckBox_b.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getModelAutoMerge());
|
||
this.var_javax_swing_JCheckBox_a.setSelected(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getXmlAutoMerge());
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://gejun123456.github.io/MyBatisCodeHelper-Pro/#/databaseToCrud");
|
||
}
|
||
}, null);
|
||
List<String> list3 = t2.a();
|
||
if (list3 != null && !list3.isEmpty()) {
|
||
this.var_javax_swing_JPanel_a.setVisible(false);
|
||
} else {
|
||
this.var_javax_swing_JPanel_a.setVisible(true);
|
||
this.var_javax_swing_JLabel_a.setForeground(Color.RED);
|
||
}
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
l l2 = new l(this.var_com_intellij_openapi_project_Project_a, (List<a>)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_javax_swing_JTextField_a), this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
boolean bl = l2.showAndGet();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
List<MyColumnOverride> list = l2.b();
|
||
List<MyIgnoredColumn> list2 = l2.a();
|
||
if (this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a == null) {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a = new TableGenerateConfig(null, list, list2);
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.setColumnOverrideList(list);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.setIgnoredColums(list2);
|
||
}
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.setUseActualColumnName(l2.java_lang_Boolean_a());
|
||
List<a> list3 = y.a((List<a>)((Object)this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_javax_swing_JTextField_a), this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUseActualColumnName());
|
||
List<a> list4 = y.a(list3, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
List<String> list5 = list4.stream().map(a::c).collect(Collectors.toList());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.a(list5);
|
||
}
|
||
});
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_b.setListener(new LinkListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
ShowSettingsUtil.getInstance().showSettingsDialog(this.var_com_intellij_openapi_project_Project_a, b_0.class);
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.a(this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_java_lang_String_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
}
|
||
}, null);
|
||
this.d = new AbstractAction(this, A.a("clearTableConfig"), project, string){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_a = string2;
|
||
super(string);
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = Messages.showOkCancelDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"do you want to clear current table save info", (String)"Clear Table info", null);
|
||
if (n2 == 0) {
|
||
int n3 = n2;
|
||
ProjectProfile projectProfile = e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a);
|
||
Map<String, TableGenerateConfig> map = projectProfile.getTableGenerateConfigs();
|
||
String string = u.a(this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.b());
|
||
TableGenerateConfig tableGenerateConfig = map.get(string);
|
||
map.remove(string);
|
||
Messages.showMessageDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Success, please reopen table", (String)"Success", null);
|
||
s.super.doOKAction();
|
||
}
|
||
}
|
||
};
|
||
this.var_javax_swing_AbstractAction_a = new AbstractAction(this, ResourceBundle.getBundle("i18n/i18n").getString("previewxml"), project){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
super(string);
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (!com.ccnode.codegenerator.ah.a.a.a(this.var_com_intellij_openapi_project_Project_a)) {
|
||
return;
|
||
}
|
||
boolean bl = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.boolean_a();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
String string = "";
|
||
try {
|
||
o o2 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_ccnode_codegenerator_mybatisGenerator_o_a();
|
||
o2.I(true);
|
||
String string2 = UUID.randomUUID().toString();
|
||
Path path = Files.createTempDirectory(string2, new FileAttribute[0]);
|
||
String string3 = path.toAbsolutePath().toString();
|
||
o2.c(string3);
|
||
o2.g(string3);
|
||
o2.e(string3);
|
||
string = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.a(o2);
|
||
String string4 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_javax_swing_JTextField_a.getText();
|
||
String string5 = p.a.a(string4, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a, o2.java_lang_String_x(), o2.java_lang_String_C());
|
||
String string6 = o2.java_lang_String_d().replaceAll("\\.", "/") + "/" + string5 + ".xml";
|
||
String string7 = o2.java_lang_String_e() + "/" + string6;
|
||
File file = new File(string7);
|
||
FileInputStream fileInputStream = new FileInputStream(file);
|
||
String string8 = IOUtils.toString((InputStream)fileInputStream, (Charset)Charsets.UTF_8).replace("\r\n", "\n");
|
||
fileInputStream.close();
|
||
FileUtils.forceDeleteOnExit((File)path.toFile());
|
||
h h2 = new h(this.var_com_intellij_openapi_project_Project_a, file.getName(), string8, (FileType)XmlFileType.INSTANCE);
|
||
h2.showAndGet();
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(exception), (String)"error");
|
||
return;
|
||
}
|
||
}
|
||
};
|
||
this.var_javax_swing_AbstractAction_b = new AbstractAction(this, ResourceBundle.getBundle("i18n/i18n").getString("open.temp.folder"), project){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
super(string);
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (!com.ccnode.codegenerator.ah.a.a.a(this.var_com_intellij_openapi_project_Project_a)) {
|
||
return;
|
||
}
|
||
boolean bl = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.boolean_a();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
String string = "";
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.void_a();
|
||
try {
|
||
o o2 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_ccnode_codegenerator_mybatisGenerator_o_a();
|
||
o2.I(true);
|
||
o2.M(true);
|
||
String string2 = UUID.randomUUID().toString();
|
||
Path path = Files.createTempDirectory(string2, new FileAttribute[0]);
|
||
String string3 = path.toAbsolutePath().toString();
|
||
o2.c(string3);
|
||
o2.g(string3);
|
||
o2.e(string3);
|
||
o2.m(string3);
|
||
o2.k(string3);
|
||
o2.t(string3);
|
||
string = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.a(o2);
|
||
String string4 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_javax_swing_JTextField_a.getText();
|
||
String string5 = p.a.a(string4, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMybatisGeneratorMapperSuffix(), this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMybatisMapperPrefix());
|
||
String string6 = o2.java_lang_String_d().replaceAll("\\.", "/") + "/" + string5 + ".xml";
|
||
String string7 = o2.java_lang_String_e() + "/" + string6;
|
||
File file = new File(string7);
|
||
int n2 = Messages.showYesNoDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)A.a("openByIntellijOrExplorer"), (String)"select", (String)A.a("openByIntellij"), (String)A.a("openByExplorer"), null);
|
||
if (n2 == 0) {
|
||
ProjectUtil.openOrImport((String)string3, null, (boolean)true);
|
||
} else {
|
||
Desktop.getDesktop().open(path.toFile());
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(exception), (String)"error");
|
||
return;
|
||
}
|
||
s.super.doOKAction();
|
||
}
|
||
};
|
||
this.var_javax_swing_AbstractAction_c = new AbstractAction(this, A.a("onlyModel"), project){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
super(string);
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (!com.ccnode.codegenerator.ah.a.a.a(this.var_com_intellij_openapi_project_Project_a)) {
|
||
return;
|
||
}
|
||
boolean bl = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.boolean_a();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
String string = "";
|
||
try {
|
||
o o2 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_ccnode_codegenerator_mybatisGenerator_o_a();
|
||
o2.I(true);
|
||
String string2 = UUID.randomUUID().toString();
|
||
Path path = Files.createTempDirectory(string2, new FileAttribute[0]);
|
||
String string3 = path.toAbsolutePath().toString();
|
||
o2.g(string3);
|
||
o2.e(string3);
|
||
string = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.a(o2);
|
||
String string4 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_javax_swing_JTextField_a.getText();
|
||
String string5 = p.a.a(string4, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMybatisGeneratorMapperSuffix(), this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMybatisMapperPrefix());
|
||
String string6 = o2.java_lang_String_d().replaceAll("\\.", "/") + "/" + string5 + ".xml";
|
||
String string7 = o2.java_lang_String_e() + "/" + string6;
|
||
FileUtils.forceDeleteOnExit((File)path.toFile());
|
||
VirtualFile virtualFile = VirtualFileManager.getInstance().refreshAndFindFileByUrl(VfsUtil.pathToUrl((String)o2.java_lang_String_c()));
|
||
if (virtualFile != null) {
|
||
VfsUtil.markDirtyAndRefresh((boolean)false, (boolean)true, (boolean)true, (VirtualFile[])new VirtualFile[]{virtualFile});
|
||
String string8 = o2.java_lang_String_c() + "/" + o2.java_lang_String_b().replace(".", "/") + "/" + string4 + ".java";
|
||
PsiFile psiFile = a_0.a.a(this.var_com_intellij_openapi_project_Project_a, string8);
|
||
if (psiFile != null) {
|
||
CodeInsightUtil.positionCursor((Project)this.var_com_intellij_openapi_project_Project_a, (PsiFile)psiFile, (PsiElement)psiFile);
|
||
}
|
||
}
|
||
s.super.doOKAction();
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(exception), (String)"error");
|
||
return;
|
||
}
|
||
}
|
||
};
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
r r2;
|
||
Object object;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
Object object2 = this.var_javax_swing_JTextField_a.iterator();
|
||
while (object2.hasNext()) {
|
||
object = (a)object2.next();
|
||
arrayList.add(((a)object).java_lang_String_a());
|
||
}
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, (Collection)arrayList, (boolean)true, (String)this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getGeneratedKey());
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_b = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a.b(), (boolean)true, (String)this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getSequenceId());
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_c = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, (Collection)arrayList, (boolean)true, (String)this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getSequenceColumn());
|
||
object2 = y.a((List<a>)((Object)this.var_javax_swing_JTextField_a), this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getUseActualColumnName());
|
||
object = y.a((List<a>)object2, this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
List<String> list = object.stream().map(a::c).collect(Collectors.toList());
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_r_a = r2 = new r(this.var_com_intellij_openapi_project_Project_a, false, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a, this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a, list, this.var_java_lang_String_a);
|
||
this.var_javax_swing_JPanel_c = r2.javax_swing_JPanel_a();
|
||
}
|
||
|
||
@NotNull
|
||
protected List<ValidationInfo> doValidateAll() {
|
||
return super.doValidateAll();
|
||
}
|
||
|
||
@Nullable
|
||
protected ValidationInfo doValidate() {
|
||
if (StringUtils.isNotBlank((String)this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText()) && StringUtils.isNotBlank((String)this.var_com_intellij_ui_TextFieldWithAutoCompletion_b.getText())) {
|
||
return new ValidationInfo("generate key and sequence can only choose one");
|
||
}
|
||
if (StringUtils.isNotBlank((String)this.var_com_intellij_ui_TextFieldWithAutoCompletion_b.getText()) && StringUtils.isBlank((String)this.var_com_intellij_ui_TextFieldWithAutoCompletion_c.getText())) {
|
||
return new ValidationInfo("sequence column should not be null");
|
||
}
|
||
return this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_intellij_openapi_ui_ValidationInfo_a();
|
||
}
|
||
|
||
@NotNull
|
||
protected Action[] createLeftSideActions() {
|
||
Action[] actionArray = new Action[]{this.var_javax_swing_AbstractAction_a, this.var_javax_swing_AbstractAction_b, this.var_javax_swing_AbstractAction_c, this.d};
|
||
return actionArray;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a != null && StringUtils.isNotBlank((String)this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getGeneratedKey())) {
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getGeneratedKey());
|
||
} else if (this.var_com_ccnode_codegenerator_mybatisGenerator_t_a.a() != null) {
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setText(this.var_com_ccnode_codegenerator_mybatisGenerator_t_a.a());
|
||
}
|
||
if (this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a != null && StringUtils.isNotBlank((String)this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getJavaModelName())) {
|
||
this.var_javax_swing_JTextField_a.setText(this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a.getJavaModelName());
|
||
} else {
|
||
this.a(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
}
|
||
return new JBScrollPane((Component)this.var_javax_swing_JPanel_b);
|
||
}
|
||
|
||
private void a(ProjectProfile projectProfile, String string, Profile profile) {
|
||
String string2 = u.a(projectProfile, string, profile);
|
||
this.var_javax_swing_JTextField_a.setText(string2);
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
if (this.var_javax_swing_JTextField_a.isEmpty()) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"there is not columns in table, please refresh the table", (String)"NO COLUMNS ERROR");
|
||
return;
|
||
}
|
||
FileDocumentManager.getInstance().saveAllDocuments();
|
||
if (!com.ccnode.codegenerator.ah.a.a.a(this.var_com_intellij_openapi_project_Project_a)) {
|
||
return;
|
||
}
|
||
boolean bl = this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.boolean_a();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.setModelAutoMerge(this.var_javax_swing_JCheckBox_b.isSelected());
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.setXmlAutoMerge(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
String string = "";
|
||
try {
|
||
string = this.a(this.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_ccnode_codegenerator_mybatisGenerator_o_a());
|
||
}
|
||
catch (InvalidConfigurationException invalidConfigurationException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a((Exception)((Object)invalidConfigurationException)), (String)"error");
|
||
return;
|
||
}
|
||
catch (InterruptedException interruptedException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(interruptedException), (String)"error");
|
||
return;
|
||
}
|
||
catch (SQLException sQLException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(sQLException), (String)"error");
|
||
return;
|
||
}
|
||
catch (IOException iOException) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)i.var_com_ccnode_codegenerator_ad_i_a.a(iOException), (String)"error");
|
||
return;
|
||
}
|
||
Messages.showMessageDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)string, (String)"success", (Icon)Messages.getInformationIcon());
|
||
super.doOKAction();
|
||
}
|
||
|
||
private String a(o o2) throws InvalidConfigurationException, InterruptedException, SQLException, IOException {
|
||
String string = this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText();
|
||
String string2 = this.var_javax_swing_JTextField_a.getText();
|
||
o o3 = o2;
|
||
o3.p(string);
|
||
o3.q(this.var_com_intellij_ui_TextFieldWithAutoCompletion_b.getText());
|
||
o3.r(this.var_com_intellij_ui_TextFieldWithAutoCompletion_c.getText());
|
||
List<String> list = u.a(this.var_com_intellij_openapi_project_Project_a, this.var_com_ccnode_codegenerator_mybatisGenerator_a_a_a, this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a, this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, o3, string2, this.var_com_ccnode_codegenerator_myconfigurable_Profile_a);
|
||
VirtualFile virtualFile = com.intellij.openapi.project.ProjectUtil.guessProjectDir((Project)this.var_com_intellij_openapi_project_Project_a);
|
||
VfsUtil.markDirtyAndRefresh((boolean)false, (boolean)true, (boolean)true, (VirtualFile[])new VirtualFile[]{virtualFile});
|
||
virtualFile.refresh(true, true, new Runnable(){
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ o var_com_ccnode_codegenerator_mybatisGenerator_o_a;
|
||
final /* synthetic */ s var_com_ccnode_codegenerator_mybatisGenerator_s_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_s_a = s2;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_ccnode_codegenerator_mybatisGenerator_o_a = o2;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
String string = p.a.a(this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_Profile_a, this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMybatisGeneratorMapperSuffix(), this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a.getMybatisMapperPrefix());
|
||
if (!this.var_com_ccnode_codegenerator_mybatisGenerator_o_a.I()) {
|
||
String string2 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_intellij_refactoring_ui_PackageNameReferenceEditorCombo_a().getText().replaceAll("\\.", "/") + "/" + string + ".java";
|
||
String string3 = this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_ccnode_codegenerator_mybatisGenerator_r_a.com_ccnode_codegenerator_mybatisGenerator_n_a().getText() + "/" + string2;
|
||
PsiFile psiFile = a_0.a.a(this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_intellij_openapi_project_Project_a, string3);
|
||
if (psiFile != null) {
|
||
CodeInsightUtil.positionCursor((Project)this.var_com_ccnode_codegenerator_mybatisGenerator_s_a.var_com_intellij_openapi_project_Project_a, (PsiFile)psiFile, (PsiElement)psiFile);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
String string3 = "generate success";
|
||
if (!list.isEmpty()) {
|
||
string3 = Joiner.on((String)"\n").join(list);
|
||
}
|
||
return string3;
|
||
}
|
||
|
||
private String a(String string) {
|
||
switch (string) {
|
||
case "MySql": {
|
||
return "MySQL";
|
||
}
|
||
case "Oracle": {
|
||
return "SqlServer";
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(6, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "java.model.name"));
|
||
jPanel2.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
this.var_javax_swing_JTextField_a.setText("");
|
||
jPanel2.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "customize.field"));
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 3, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_b = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_b, this.a("i18n/i18n", "removetableprename"));
|
||
jPanel2.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_b, new GridConstraints(0, 2, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel3, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "usegeneratedkey.primay.key.can.be.empty"));
|
||
jLabel2.setToolTipText("<22><><B2><E5>ʱ<EB><CAB1><B7>ص<BB><D8B5><C4>");
|
||
jPanel3.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.setToolTipText(this.a("i18n/i18n", "insertʱ<74><CAB1><C9>ɵ<B3><C9B5><C4><D6><F7>"));
|
||
jPanel3.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_a, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel.add((Component)jScrollPane, new GridConstraints(4, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JPanel_c);
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel4, new GridConstraints(3, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "sequence.oracle"));
|
||
jPanel4.add((Component)jLabel3, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_b, new GridConstraints(0, 1, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
this.a(jLabel4, this.a("i18n/i18n", "column"));
|
||
jPanel4.add((Component)jLabel4, new GridConstraints(0, 2, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)this.var_com_intellij_ui_TextFieldWithAutoCompletion_c, new GridConstraints(0, 3, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(2, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.a(this.var_javax_swing_JLabel_a, this.a("i18n/i18n", "NoPrimaryKeyInfo"));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel5, new GridConstraints(5, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel5.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "merge"), 0, 0, null, null));
|
||
Spacer spacer2 = new Spacer();
|
||
jPanel5.add((Component)spacer2, new GridConstraints(0, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_b = new JCheckBox();
|
||
this.var_javax_swing_JCheckBox_b.setSelected(false);
|
||
this.a(this.var_javax_swing_JCheckBox_b, this.a("i18n/i18n", "automergejavamodel"));
|
||
jPanel5.add((Component)this.var_javax_swing_JCheckBox_b, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_a, this.a("i18n/i18n", "how.file.merge"));
|
||
jPanel5.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(0, 2, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", "auto.merge.xml"));
|
||
jPanel5.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_F_a_a = com.ccnode.codegenerator.F.c.var_com_ccnode_codegenerator_F_c_a.a(s.class);
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import java.util.List;
|
||
|
||
public class t {
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private String var_java_lang_String_a;
|
||
private List<a> var_java_util_List_com_ccnode_codegenerator_mybatisGenerator_a__b;
|
||
private String var_java_lang_String_b;
|
||
|
||
public List<String> a() {
|
||
return this.var_java_util_List_java_lang_String__a;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_java_util_List_java_lang_String__a = list;
|
||
}
|
||
|
||
public String a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public List<a> b() {
|
||
return this.var_java_util_List_com_ccnode_codegenerator_mybatisGenerator_a__b;
|
||
}
|
||
|
||
public void b(List<a> list) {
|
||
this.var_java_util_List_com_ccnode_codegenerator_mybatisGenerator_a__b = list;
|
||
}
|
||
|
||
public String b() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.var_java_lang_String_b = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof t)) {
|
||
return false;
|
||
}
|
||
t t2 = (t)object;
|
||
if (!t2.a(this)) {
|
||
return false;
|
||
}
|
||
List<String> list = this.a();
|
||
List<String> list2 = t2.a();
|
||
if (list == null ? list2 != null : !((Object)list).equals(list2)) {
|
||
return false;
|
||
}
|
||
String string = this.a();
|
||
String string2 = t2.a();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
List<a> list3 = this.b();
|
||
List<a> list4 = t2.b();
|
||
if (list3 == null ? list4 != null : !((Object)list3).equals(list4)) {
|
||
return false;
|
||
}
|
||
String string3 = this.b();
|
||
String string4 = t2.b();
|
||
return !(string3 == null ? string4 != null : !string3.equals(string4));
|
||
}
|
||
|
||
protected boolean a(Object object) {
|
||
return object instanceof t;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
List<String> list = this.a();
|
||
n3 = n3 * 59 + (list == null ? 43 : ((Object)list).hashCode());
|
||
String string = this.a();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
List<a> list2 = this.b();
|
||
n3 = n3 * 59 + (list2 == null ? 43 : ((Object)list2).hashCode());
|
||
String string2 = this.b();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "MybatisGeneratorTableInfo(primaryColumn=" + this.a() + ", insertGeneratedKey=" + this.a() + ", columnInfos=" + this.b() + ", tableRemarks=" + this.b() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.application.options.CodeStyle
|
||
* com.intellij.ide.fileTemplates.FileTemplate
|
||
* com.intellij.ide.fileTemplates.FileTemplateManager
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.project.Project
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.mybatis.generator.api.IntellijTableInfo
|
||
* org.mybatis.generator.api.MyBatisGenerator
|
||
* org.mybatis.generator.api.MybatisGeneratorBridge
|
||
* org.mybatis.generator.api.ShellCallback
|
||
* org.mybatis.generator.api.dom.OutputUtilities
|
||
* org.mybatis.generator.api.intellij.IntellijColumnInfo
|
||
* org.mybatis.generator.config.ColumnOverride
|
||
* org.mybatis.generator.config.ColumnRenamingRule
|
||
* org.mybatis.generator.config.Configuration
|
||
* org.mybatis.generator.config.Context
|
||
* org.mybatis.generator.config.GeneratedKey
|
||
* org.mybatis.generator.config.IgnoredColumn
|
||
* org.mybatis.generator.config.JDBCConnectionConfiguration
|
||
* org.mybatis.generator.config.JavaClientGeneratorConfiguration
|
||
* org.mybatis.generator.config.JavaModelGeneratorConfiguration
|
||
* org.mybatis.generator.config.ModelType
|
||
* org.mybatis.generator.config.SqlMapGeneratorConfiguration
|
||
* org.mybatis.generator.config.TableConfiguration
|
||
* org.mybatis.generator.exception.InvalidConfigurationException
|
||
* org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl
|
||
* org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl$JdbcTypeInformation
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.F.c;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DBType;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseConnector;
|
||
import com.ccnode.codegenerator.freemarker.b;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.f;
|
||
import com.ccnode.codegenerator.mybatisGenerator.i;
|
||
import com.ccnode.codegenerator.mybatisGenerator.o;
|
||
import com.ccnode.codegenerator.mybatisGenerator.p;
|
||
import com.ccnode.codegenerator.mybatisGenerator.v;
|
||
import com.ccnode.codegenerator.myconfigurable.MyColumnOverride;
|
||
import com.ccnode.codegenerator.myconfigurable.MyIgnoredColumn;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.myconfigurable.TableGenerateConfig;
|
||
import com.ccnode.codegenerator.myconfigurable.UserPackageAndPathInfoByModule;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.application.options.CodeStyle;
|
||
import com.intellij.ide.fileTemplates.FileTemplate;
|
||
import com.intellij.ide.fileTemplates.FileTemplateManager;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import java.io.IOException;
|
||
import java.sql.SQLException;
|
||
import java.time.LocalDate;
|
||
import java.time.LocalDateTime;
|
||
import java.time.LocalTime;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.Properties;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.mybatis.generator.api.IntellijTableInfo;
|
||
import org.mybatis.generator.api.MyBatisGenerator;
|
||
import org.mybatis.generator.api.MybatisGeneratorBridge;
|
||
import org.mybatis.generator.api.ShellCallback;
|
||
import org.mybatis.generator.api.dom.OutputUtilities;
|
||
import org.mybatis.generator.api.intellij.IntellijColumnInfo;
|
||
import org.mybatis.generator.config.ColumnOverride;
|
||
import org.mybatis.generator.config.ColumnRenamingRule;
|
||
import org.mybatis.generator.config.Configuration;
|
||
import org.mybatis.generator.config.Context;
|
||
import org.mybatis.generator.config.GeneratedKey;
|
||
import org.mybatis.generator.config.IgnoredColumn;
|
||
import org.mybatis.generator.config.JDBCConnectionConfiguration;
|
||
import org.mybatis.generator.config.JavaClientGeneratorConfiguration;
|
||
import org.mybatis.generator.config.JavaModelGeneratorConfiguration;
|
||
import org.mybatis.generator.config.ModelType;
|
||
import org.mybatis.generator.config.SqlMapGeneratorConfiguration;
|
||
import org.mybatis.generator.config.TableConfiguration;
|
||
import org.mybatis.generator.exception.InvalidConfigurationException;
|
||
import org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl;
|
||
|
||
public class u
|
||
extends JavaTypeResolverDefaultImpl {
|
||
private static com.ccnode.codegenerator.F.a a = c.var_com_ccnode_codegenerator_F_c_a.a(u.class);
|
||
|
||
public static List<a> a(IntellijTableInfo intellijTableInfo, boolean bl) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (IntellijColumnInfo intellijColumnInfo : intellijTableInfo.getColumnInfos()) {
|
||
String string = intellijColumnInfo.getName();
|
||
int n2 = intellijColumnInfo.getDataType();
|
||
u u2 = new u();
|
||
String string2 = u2.a(n2);
|
||
String string3 = DatabaseConnector.INSTANCE.getDefaultJavaPropertyFromColumnName(string);
|
||
String string4 = u2.a(n2, intellijColumnInfo.getDecimalDigits(), intellijColumnInfo.getSize(), bl);
|
||
arrayList.add(new a(string, string2, string3, string4, null, true));
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
public static UserPackageAndPathInfoByModule a(String string, ProjectProfile projectProfile, Map<String, List<String>> map, Map<String, List<String>> map2) {
|
||
if (projectProfile.getModuleNameToPackageAndPathMap().get(string) != null) {
|
||
UserPackageAndPathInfoByModule userPackageAndPathInfoByModule = projectProfile.getModuleNameToPackageAndPathMap().get(string);
|
||
if (userPackageAndPathInfoByModule.getJavaServicePath() == null && u.a(string, map)) {
|
||
userPackageAndPathInfoByModule.setJavaServicePath(map.get(string).get(0));
|
||
}
|
||
if (userPackageAndPathInfoByModule.getJavaServiceInterfacePath() == null && u.a(string, map)) {
|
||
userPackageAndPathInfoByModule.setJavaServiceInterfacePath(map.get(string).get(0));
|
||
}
|
||
return userPackageAndPathInfoByModule;
|
||
}
|
||
UserPackageAndPathInfoByModule userPackageAndPathInfoByModule = new UserPackageAndPathInfoByModule();
|
||
if (projectProfile.getJavaModelPackage() != null) {
|
||
userPackageAndPathInfoByModule.setJavaModelPacakge(projectProfile.getJavaModelPackage());
|
||
} else {
|
||
userPackageAndPathInfoByModule.setJavaModelPacakge("com.domain");
|
||
}
|
||
if (projectProfile.getJavaMapperPackage() != null) {
|
||
userPackageAndPathInfoByModule.setJavaMapperPackage(projectProfile.getJavaMapperPackage());
|
||
} else {
|
||
userPackageAndPathInfoByModule.setJavaMapperPackage("com.mapper");
|
||
}
|
||
if (projectProfile.getXmlMapperPackage() != null) {
|
||
userPackageAndPathInfoByModule.setXmlPackage(projectProfile.getXmlMapperPackage());
|
||
} else {
|
||
userPackageAndPathInfoByModule.setXmlPackage("mapperxml");
|
||
}
|
||
if (u.a(string, map)) {
|
||
userPackageAndPathInfoByModule.setJavaModelPath(map.get(string).get(0));
|
||
userPackageAndPathInfoByModule.setJavaMapperPath(map.get(string).get(0));
|
||
userPackageAndPathInfoByModule.setJavaServicePath(map.get(string).get(0));
|
||
userPackageAndPathInfoByModule.setJavaServiceInterfacePath(map.get(string).get(0));
|
||
} else {
|
||
userPackageAndPathInfoByModule.setJavaModelPath(null);
|
||
userPackageAndPathInfoByModule.setJavaMapperPath(null);
|
||
}
|
||
if (u.a(string, map2)) {
|
||
userPackageAndPathInfoByModule.setXmlPath(map2.get(string).get(0));
|
||
} else {
|
||
userPackageAndPathInfoByModule.setXmlPath(null);
|
||
}
|
||
return userPackageAndPathInfoByModule;
|
||
}
|
||
|
||
private static boolean a(String string, Map<String, List<String>> map) {
|
||
return !map.isEmpty() && !map.get(string).isEmpty();
|
||
}
|
||
|
||
@NotNull
|
||
public static TableGenerateConfig a(String string, ProjectProfile projectProfile, String string2) {
|
||
Map<String, TableGenerateConfig> map = projectProfile.getTableGenerateConfigs();
|
||
TableGenerateConfig tableGenerateConfig = map.get(u.a(string, string2));
|
||
if (tableGenerateConfig != null) {
|
||
return tableGenerateConfig;
|
||
}
|
||
TableGenerateConfig tableGenerateConfig2 = new TableGenerateConfig(null, Lists.newArrayList(), Lists.newArrayList());
|
||
p.a.a(projectProfile, tableGenerateConfig2);
|
||
return tableGenerateConfig2;
|
||
}
|
||
|
||
@NotNull
|
||
public static String a(String string, String string2) {
|
||
return string2 + ":" + string;
|
||
}
|
||
|
||
@NotNull
|
||
public static List<String> a(Project project, com.ccnode.codegenerator.mybatisGenerator.a.a a2, TableGenerateConfig tableGenerateConfig, String string, ProjectProfile projectProfile, o o2, String string2, Profile profile) throws InvalidConfigurationException, SQLException, IOException, InterruptedException {
|
||
Object object;
|
||
Object object2;
|
||
String string3;
|
||
NewDatabaseInfo newDatabaseInfo;
|
||
JDBCConnectionConfiguration jDBCConnectionConfiguration;
|
||
String string4;
|
||
OutputUtilities.lineSeparator = string4 = CodeStyle.getSettings((Project)project).getLineSeparator();
|
||
b.var_java_lang_String_a = string4;
|
||
String string5 = o2.java_lang_String_p();
|
||
ArrayList<String> arrayList = new ArrayList<String>();
|
||
boolean bl = true;
|
||
Configuration configuration = new Configuration();
|
||
Context context = new Context(ModelType.FLAT);
|
||
context.setId("mySql");
|
||
context.setTargetRuntime("MyBatis3");
|
||
context.addProperty("javaFileEncoding", "UTF-8");
|
||
if (!a2.boolean_a()) {
|
||
jDBCConnectionConfiguration = new JDBCConnectionConfiguration();
|
||
jDBCConnectionConfiguration.setDriverClass(u.b(a2.java_lang_String_a()));
|
||
newDatabaseInfo = a2.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a();
|
||
string3 = DatabaseConnector.INSTANCE.buildUrl(a2.java_lang_String_a(), newDatabaseInfo.getUrl(), a2.b());
|
||
if (StringUtils.isNotBlank((String)newDatabaseInfo.getDriverPath())) {
|
||
configuration.addClasspathEntry(newDatabaseInfo.getDriverPath());
|
||
}
|
||
jDBCConnectionConfiguration.setConnectionURL(string3);
|
||
if (a2.java_lang_String_a().equals("MySql")) {
|
||
jDBCConnectionConfiguration.addProperty("nullCatalogMeansCurrent", "true");
|
||
}
|
||
jDBCConnectionConfiguration.setUserId(a2.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a().getUserName());
|
||
jDBCConnectionConfiguration.setPassword(a2.com_ccnode_codegenerator_myconfigurable_NewDatabaseInfo_a().getPassword());
|
||
if (a2.java_lang_String_a().equals("Oracle")) {
|
||
jDBCConnectionConfiguration.addProperty("remarksReporting", "true");
|
||
}
|
||
context.setJdbcConnectionConfiguration(jDBCConnectionConfiguration);
|
||
}
|
||
context.addProperty("dbType", a2.java_lang_String_a());
|
||
u.a(context, a2.java_lang_String_a());
|
||
jDBCConnectionConfiguration = new JavaModelGeneratorConfiguration();
|
||
newDatabaseInfo = new SqlMapGeneratorConfiguration();
|
||
string3 = new JavaClientGeneratorConfiguration();
|
||
TableConfiguration tableConfiguration = new TableConfiguration(context);
|
||
f f2 = f.com_ccnode_codegenerator_mybatisGenerator_f_a(a2.java_lang_String_a());
|
||
tableConfiguration.setTableName(string);
|
||
tableConfiguration.setDomainObjectName(string2);
|
||
if (com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDelimeteAllColumn()) {
|
||
tableConfiguration.setAllColumnDelimitingEnabled(true);
|
||
tableConfiguration.setDelimitIdentifiers(true);
|
||
}
|
||
p.a.a(context, (JavaModelGeneratorConfiguration)jDBCConnectionConfiguration, (SqlMapGeneratorConfiguration)newDatabaseInfo, (JavaClientGeneratorConfiguration)string3, tableConfiguration, tableGenerateConfig, o2, projectProfile, profile, a2, project);
|
||
if (tableGenerateConfig.getUseActualColumnName() != null) {
|
||
projectProfile.setUseActualColumnNames(tableGenerateConfig.getUseActualColumnName());
|
||
if (tableGenerateConfig.getUseActualColumnName().booleanValue()) {
|
||
tableConfiguration.addProperty("useActualColumnNames", "true");
|
||
}
|
||
}
|
||
if (!a2.boolean_a()) {
|
||
if (a2.java_lang_String_a().equals("MySql")) {
|
||
tableConfiguration.setCatalog(null);
|
||
} else if (a2.java_lang_String_a().equalsIgnoreCase("Oracle")) {
|
||
tableConfiguration.setCatalog(a2.b());
|
||
} else if (a2.java_lang_String_a().equalsIgnoreCase("SqlServer")) {
|
||
tableConfiguration.setCatalog(a2.b());
|
||
}
|
||
if (a2.java_lang_String_a().equals("MySql")) {
|
||
tableConfiguration.setSchema(null);
|
||
} else {
|
||
tableConfiguration.setSchema(null);
|
||
}
|
||
}
|
||
if (tableGenerateConfig.getIgnoredColums() != null) {
|
||
object2 = tableGenerateConfig.getIgnoredColums().iterator();
|
||
while (object2.hasNext()) {
|
||
object = (MyIgnoredColumn)object2.next();
|
||
tableConfiguration.addIgnoredColumn(u.a((MyIgnoredColumn)object));
|
||
}
|
||
}
|
||
if (StringUtils.isNotBlank((String)(object2 = o2.java_lang_String_E()))) {
|
||
object = ((String)object2).split(";");
|
||
for (String string6 : object) {
|
||
if (!StringUtils.isNotBlank((String)string6)) continue;
|
||
IgnoredColumn ignoredColumn = new IgnoredColumn(string6);
|
||
ignoredColumn.setColumnNameDelimited(false);
|
||
tableConfiguration.addIgnoredColumn(ignoredColumn);
|
||
}
|
||
}
|
||
if (o2.K()) {
|
||
object = new ColumnRenamingRule();
|
||
object.setSearchString(o2.java_lang_String_v());
|
||
object.setReplaceString(o2.java_lang_String_w());
|
||
tableConfiguration.setColumnRenamingRule(object);
|
||
}
|
||
for (MyColumnOverride myColumnOverride : tableGenerateConfig.getColumnOverrideList()) {
|
||
tableConfiguration.addColumnOverride(u.a(myColumnOverride));
|
||
}
|
||
tableGenerateConfig.setJavaModelName(string2);
|
||
if (StringUtils.isNotBlank((String)string5)) {
|
||
tableConfiguration.setGeneratedKey(new GeneratedKey(string5, "JDBC", false, null));
|
||
}
|
||
tableGenerateConfig.setGeneratedKey(string5);
|
||
if (StringUtils.isNotBlank((String)o2.java_lang_String_q())) {
|
||
tableConfiguration.setGeneratedKey(new GeneratedKey(o2.java_lang_String_r(), "select " + o2.java_lang_String_q() + ".nextval from dual", false, "pre"));
|
||
context.addProperty("sequenceId", o2.java_lang_String_q());
|
||
}
|
||
tableGenerateConfig.setSequenceId(o2.java_lang_String_q());
|
||
tableGenerateConfig.setSequenceColumn(o2.java_lang_String_r());
|
||
projectProfile.getTableGenerateConfigs().put(u.a(string, a2.b()), tableGenerateConfig);
|
||
context.setJavaClientGeneratorConfiguration((JavaClientGeneratorConfiguration)string3);
|
||
context.setJavaModelGeneratorConfiguration((JavaModelGeneratorConfiguration)jDBCConnectionConfiguration);
|
||
context.setSqlMapGeneratorConfiguration((SqlMapGeneratorConfiguration)newDatabaseInfo);
|
||
context.addTableConfiguration(tableConfiguration);
|
||
configuration.addContext(context);
|
||
object = new i(project, bl, string2, o2);
|
||
Object var21_24 = null;
|
||
v.a.set(project);
|
||
if (!a2.boolean_a()) {
|
||
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(configuration, (ShellCallback)object, arrayList);
|
||
myBatisGenerator.generate(null);
|
||
} else {
|
||
MybatisGeneratorBridge mybatisGeneratorBridge = new MybatisGeneratorBridge(configuration, (ShellCallback)object, arrayList);
|
||
mybatisGeneratorBridge.generate(null, a2.org_mybatis_generator_api_IntellijTableInfo_a(string));
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
/*
|
||
* WARNING - void declaration
|
||
*/
|
||
@Nullable
|
||
public static String b(String string, String string2) {
|
||
void var5_8;
|
||
Project project = v.a.get();
|
||
if (project == null) {
|
||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||
throw new RuntimeException("project should not be null");
|
||
}
|
||
return null;
|
||
}
|
||
FileTemplate[] fileTemplateArray = FileTemplateManager.getInstance((Project)project).getTemplates("Includes");
|
||
if (fileTemplateArray.length == 0) {
|
||
return null;
|
||
}
|
||
FileTemplate fileTemplate = null;
|
||
for (FileTemplate fileTemplate2 : fileTemplateArray) {
|
||
if (!fileTemplate2.getName().equals("File Header")) continue;
|
||
fileTemplate = fileTemplate2;
|
||
break;
|
||
}
|
||
if (fileTemplate == null) {
|
||
return null;
|
||
}
|
||
String string3 = "";
|
||
try {
|
||
Properties properties = FileTemplateManager.getInstance((Project)project).getDefaultProperties();
|
||
properties.setProperty("name", string);
|
||
properties.setProperty("name".toUpperCase(), string);
|
||
properties.setProperty("file_name", string);
|
||
properties.setProperty("file_name".toUpperCase(), string);
|
||
properties.setProperty("package_name".toUpperCase(), string2);
|
||
properties.setProperty("package_name", string2);
|
||
String string4 = fileTemplate.getText(properties);
|
||
}
|
||
catch (IOException iOException) {
|
||
iOException.printStackTrace();
|
||
}
|
||
return var5_8;
|
||
}
|
||
|
||
public static String java_lang_String_a(String string) {
|
||
if (u.boolean_a(string)) {
|
||
return string.substring(1, string.length() - 1);
|
||
}
|
||
return string;
|
||
}
|
||
|
||
private static boolean boolean_a(String string) {
|
||
if (string.startsWith("`") && string.endsWith("`")) {
|
||
return true;
|
||
}
|
||
if (string.startsWith("[") && string.endsWith("]")) {
|
||
return true;
|
||
}
|
||
if (string.startsWith("\"") && string.endsWith("\"")) {
|
||
return true;
|
||
}
|
||
return string.startsWith("'") && string.endsWith("'");
|
||
}
|
||
|
||
@NotNull
|
||
public static String a(ProjectProfile projectProfile, String string, Profile profile) {
|
||
String string2 = projectProfile.getRemoveTablePreName();
|
||
String string3 = string;
|
||
if (string2 != null) {
|
||
String[] stringArray;
|
||
for (String string4 : stringArray = string2.split(";")) {
|
||
if (!string3.startsWith(string4)) continue;
|
||
string3 = string3.substring(string4.length());
|
||
break;
|
||
}
|
||
}
|
||
return n.i(string3) + profile.getMybatisGeneratorModelSuffix();
|
||
}
|
||
|
||
public String a(Integer n2, Integer n3, Integer n4, boolean bl) {
|
||
Object var5_5 = null;
|
||
JavaTypeResolverDefaultImpl.JdbcTypeInformation jdbcTypeInformation = (JavaTypeResolverDefaultImpl.JdbcTypeInformation)this.typeMap.get(n2);
|
||
if (jdbcTypeInformation != null) {
|
||
String string = jdbcTypeInformation.getFullyQualifiedJavaType().getFullyQualifiedName();
|
||
if ((n2.equals(2) || n2.equals(3)) && n3 <= 0 && n4 <= 18 && n4 > 0) {
|
||
if (n4 > 9) {
|
||
return Long.class.getName();
|
||
}
|
||
if (n4 > 4) {
|
||
return Integer.class.getName();
|
||
}
|
||
return Short.class.getName();
|
||
}
|
||
if (bl) {
|
||
if (n2.equals(91)) {
|
||
return LocalDate.class.getName();
|
||
}
|
||
if (n2.equals(93)) {
|
||
return LocalDateTime.class.getName();
|
||
}
|
||
if (n2.equals(92)) {
|
||
return LocalTime.class.getName();
|
||
}
|
||
}
|
||
return string;
|
||
}
|
||
return "java.lang.Object";
|
||
}
|
||
|
||
public String a(Integer n2) {
|
||
Object var2_2 = null;
|
||
JavaTypeResolverDefaultImpl.JdbcTypeInformation jdbcTypeInformation = (JavaTypeResolverDefaultImpl.JdbcTypeInformation)this.typeMap.get(n2);
|
||
if (jdbcTypeInformation != null) {
|
||
return jdbcTypeInformation.getJdbcTypeName();
|
||
}
|
||
return "VARCHAR";
|
||
}
|
||
|
||
private static ColumnOverride a(MyColumnOverride myColumnOverride) {
|
||
ColumnOverride columnOverride = new ColumnOverride(myColumnOverride.getColumnName());
|
||
columnOverride.setJavaProperty(myColumnOverride.getJavaProperty());
|
||
columnOverride.setJavaType(myColumnOverride.getJavaType());
|
||
columnOverride.setJdbcType(myColumnOverride.getJdbcType());
|
||
columnOverride.setTypeHandler(myColumnOverride.getTypeHandler());
|
||
columnOverride.setColumnNameDelimited(false);
|
||
columnOverride.setGeneratedAlways(false);
|
||
return columnOverride;
|
||
}
|
||
|
||
private static IgnoredColumn a(MyIgnoredColumn myIgnoredColumn) {
|
||
IgnoredColumn ignoredColumn = new IgnoredColumn(myIgnoredColumn.getColumnName());
|
||
ignoredColumn.setColumnNameDelimited(false);
|
||
return ignoredColumn;
|
||
}
|
||
|
||
public static String b(String string) {
|
||
return DBType.valueOf(string).getDriverClass();
|
||
}
|
||
|
||
private static void a(Context context, String string) {
|
||
context.addProperty("autoDelimitKeywords", "true");
|
||
f f2 = f.com_ccnode_codegenerator_mybatisGenerator_f_a(string);
|
||
context.addProperty("beginningDelimiter", f2.a());
|
||
context.addProperty("endingDelimiter", f2.b());
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* kotlin.Pair
|
||
* org.apache.commons.lang.exception.ExceptionUtils
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.datasourceToolWindow.dbInfo.DatabaseConnector;
|
||
import com.ccnode.codegenerator.mybatisGenerator.PropertyNameConverter;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.b;
|
||
import com.ccnode.codegenerator.mybatisGenerator.c;
|
||
import com.ccnode.codegenerator.mybatisGenerator.e;
|
||
import com.ccnode.codegenerator.mybatisGenerator.y;
|
||
import com.ccnode.codegenerator.myconfigurable.MyColumnOverride;
|
||
import com.ccnode.codegenerator.myconfigurable.MyIgnoredColumn;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.TableGenerateConfig;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractAction;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.ButtonGroup;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JRadioButton;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTable;
|
||
import javax.swing.KeyStroke;
|
||
import kotlin.Pair;
|
||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class l
|
||
extends DialogWrapper {
|
||
private JRadioButton var_javax_swing_JRadioButton_a;
|
||
private JRadioButton var_javax_swing_JRadioButton_b;
|
||
private JTable var_javax_swing_JTable_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JComboBox var_javax_swing_JComboBox_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JButton var_javax_swing_JButton_b;
|
||
public JLabel var_javax_swing_JLabel_a;
|
||
private List<MyIgnoredColumn> var_java_util_List_com_ccnode_codegenerator_myconfigurable_MyIgnoredColumn__a;
|
||
private List<MyColumnOverride> var_java_util_List_com_ccnode_codegenerator_myconfigurable_MyColumnOverride__b;
|
||
private List<a> c;
|
||
private List<a> d;
|
||
private Boolean var_java_lang_Boolean_a;
|
||
private TableGenerateConfig var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public l(@Nullable Project project, List<a> list, @NotNull TableGenerateConfig tableGenerateConfig, Profile profile) {
|
||
super(project, true);
|
||
this.var_java_lang_Boolean_a = tableGenerateConfig.getUseActualColumnName();
|
||
this.c = y.a(list, this.var_java_lang_Boolean_a);
|
||
this.d = y.a(this.c, tableGenerateConfig, profile);
|
||
this.var_com_ccnode_codegenerator_myconfigurable_TableGenerateConfig_a = tableGenerateConfig;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.b();
|
||
ButtonGroup buttonGroup = new ButtonGroup();
|
||
buttonGroup.add(this.var_javax_swing_JRadioButton_a);
|
||
buttonGroup.add(this.var_javax_swing_JRadioButton_b);
|
||
this.var_javax_swing_JLabel_a.setText(A.a("typeMapperWarning"));
|
||
this.var_javax_swing_JLabel_a.setForeground(Color.RED);
|
||
if (this.var_java_lang_Boolean_a.booleanValue()) {
|
||
this.var_javax_swing_JRadioButton_b.setSelected(true);
|
||
this.var_javax_swing_JRadioButton_a.setSelected(false);
|
||
} else {
|
||
this.var_javax_swing_JRadioButton_b.setSelected(false);
|
||
this.var_javax_swing_JRadioButton_a.setSelected(true);
|
||
}
|
||
this.var_javax_swing_JRadioButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = l.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string = (String)l.this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string2 = DatabaseConnector.INSTANCE.getDefaultJavaPropertyFromColumnName(string);
|
||
l.this.var_javax_swing_JTable_a.setValueAt(string2, i2, 4);
|
||
}
|
||
}
|
||
});
|
||
Map<String, String> map = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a).getJavaMethodProfiles();
|
||
map.forEach((string, string2) -> this.var_javax_swing_JComboBox_a.addItem(string));
|
||
this.var_javax_swing_JRadioButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = l.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string = (String)l.this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
l.this.var_javax_swing_JTable_a.setValueAt(string, i2, 4);
|
||
}
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
c c2 = new c(l.this.var_com_intellij_openapi_project_Project_a);
|
||
boolean bl = c2.showAndGet();
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
Pair<String, String> pair = c2.a();
|
||
Map<String, String> map = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(l.this.var_com_intellij_openapi_project_Project_a).getJavaMethodProfiles();
|
||
map.put((String)pair.getFirst(), (String)pair.getSecond());
|
||
l.this.var_javax_swing_JComboBox_a.removeAllItems();
|
||
map.forEach((string, string2) -> l.this.var_javax_swing_JComboBox_a.addItem(string));
|
||
l.this.var_javax_swing_JComboBox_a.setSelectedItem(pair.getFirst());
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
Object object = l.this.var_javax_swing_JComboBox_a.getSelectedItem();
|
||
if (object == null) {
|
||
Messages.showErrorDialog((Project)l.this.var_com_intellij_openapi_project_Project_a, (String)"select profile is null", (String)"Error");
|
||
return;
|
||
}
|
||
Map<String, String> map = com.ccnode.codegenerator.ag.e.e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(l.this.var_com_intellij_openapi_project_Project_a).getJavaMethodProfiles();
|
||
String string = map.get(object);
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
Messages.showErrorDialog((Project)l.this.var_com_intellij_openapi_project_Project_a, (String)"cant find profileName", (String)"Error");
|
||
return;
|
||
}
|
||
try {
|
||
PropertyNameConverter propertyNameConverter = com.ccnode.codegenerator.mybatisGenerator.c.a(string);
|
||
int n2 = l.this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
String string2 = (String)l.this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string3 = propertyNameConverter.convertColumnNameToPropertyName(string2);
|
||
l.this.var_javax_swing_JTable_a.setValueAt(string3, i2, 4);
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
Messages.showErrorDialog((Project)l.this.var_com_intellij_openapi_project_Project_a, (String)ExceptionUtils.getStackTrace((Throwable)exception), (String)"Error to apply column name");
|
||
}
|
||
}
|
||
});
|
||
KeyStroke keyStroke = KeyStroke.getKeyStroke(10, 0);
|
||
this.var_javax_swing_JTable_a.getInputMap(1).put(keyStroke, "Solve");
|
||
this.var_javax_swing_JTable_a.getActionMap().put("Solve", new AbstractAction(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
int n2 = l.this.var_javax_swing_JTable_a.getSelectedColumn();
|
||
int n3 = l.this.var_javax_swing_JTable_a.getSelectedRow();
|
||
if (n2 >= 0 && n3 >= 0) {
|
||
l.this.var_javax_swing_JTable_a.editCellAt(n3, n2);
|
||
}
|
||
}
|
||
});
|
||
this.setTitle("customize columns for table");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JTable_a = new e(this.d, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
this.var_javax_swing_JRadioButton_a = Lists.newArrayList();
|
||
this.var_javax_swing_JRadioButton_b = Lists.newArrayList();
|
||
this.var_java_lang_Boolean_a = this.var_javax_swing_JRadioButton_b.isSelected();
|
||
this.c = y.a(this.c, this.var_java_lang_Boolean_a);
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
int n2 = this.var_javax_swing_JTable_a.getRowCount();
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
Boolean bl = (Boolean)this.var_javax_swing_JTable_a.getValueAt(i2, 0);
|
||
String string = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 1);
|
||
String string2 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 2);
|
||
String string3 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 3);
|
||
String string4 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 4);
|
||
String string5 = (String)this.var_javax_swing_JTable_a.getValueAt(i2, 5);
|
||
a a2 = new a(string, string2, string4, string3, string5, bl);
|
||
arrayList.add(a2);
|
||
}
|
||
b b2 = y.a(this.c, arrayList, com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a());
|
||
this.var_javax_swing_JRadioButton_b = b2.a;
|
||
this.var_javax_swing_JRadioButton_a = b2.b;
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public List<MyIgnoredColumn> a() {
|
||
return this.var_javax_swing_JRadioButton_a;
|
||
}
|
||
|
||
public void a(List<MyIgnoredColumn> list) {
|
||
this.var_javax_swing_JRadioButton_a = list;
|
||
}
|
||
|
||
public List<MyColumnOverride> b() {
|
||
return this.var_javax_swing_JRadioButton_b;
|
||
}
|
||
|
||
public void b(List<MyColumnOverride> list) {
|
||
this.var_javax_swing_JRadioButton_b = list;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.java_lang_String_a("i18n/i18n", "javapropertynames"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_a = new JRadioButton();
|
||
this.var_javax_swing_JRadioButton_a.setSelected(true);
|
||
this.a(this.var_javax_swing_JRadioButton_a, this.java_lang_String_a("i18n/i18n", "camel"));
|
||
jPanel.add((Component)this.var_javax_swing_JRadioButton_a, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JRadioButton_b = new JRadioButton();
|
||
this.a(this.var_javax_swing_JRadioButton_b, this.java_lang_String_a("i18n/i18n", "useacutalcolumnames"));
|
||
jPanel.add((Component)this.var_javax_swing_JRadioButton_b, new GridConstraints(0, 2, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
jPanel.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(1, 2, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.java_lang_String_a("i18n/i18n", "config.new.method"));
|
||
jPanel.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(1, 3, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.java_lang_String_a("i18n/i18n", "propertynameconverter"));
|
||
jPanel.add((Component)jLabel2, new GridConstraints(1, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.a(this.var_javax_swing_JButton_b, this.java_lang_String_a("i18n/i18n", "apply"));
|
||
jPanel.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(1, 4, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
this.var_javax_swing_JPanel_a.add((Component)jScrollPane, new GridConstraints(2, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTable_a);
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.var_javax_swing_JLabel_a.setText("");
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
private String java_lang_String_a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = ((Object)((Object)this)).getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.internal.db.SqlReservedWords
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.j.a;
|
||
import org.mybatis.generator.internal.db.SqlReservedWords;
|
||
|
||
public class m {
|
||
public static boolean a(String string) {
|
||
return SqlReservedWords.containsWord((String)string) || a.com_ccnode_codegenerator_myconfigurable_Profile_a().getDelimeteAllColumn();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.ComponentWithBrowseButton
|
||
* com.intellij.ui.TextAccessor
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.ComponentWithBrowseButton;
|
||
import com.intellij.ui.TextAccessor;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import java.util.Collection;
|
||
import java.util.Collections;
|
||
import javax.swing.JComponent;
|
||
|
||
public class n
|
||
extends ComponentWithBrowseButton<TextFieldWithAutoCompletion<String>>
|
||
implements TextAccessor {
|
||
public n(Project project) {
|
||
super((JComponent)TextFieldWithAutoCompletion.create((Project)project, Collections.emptyList(), (boolean)true, null), null);
|
||
}
|
||
|
||
public String getText() {
|
||
String string = ((TextFieldWithAutoCompletion)this.getChildComponent()).getText();
|
||
return string.replace("\\", "/");
|
||
}
|
||
|
||
public void a(Collection<String> collection) {
|
||
((TextFieldWithAutoCompletion)this.getChildComponent()).setVariants(collection);
|
||
}
|
||
|
||
public void setText(String string) {
|
||
if (string != null) {
|
||
((TextFieldWithAutoCompletion)this.getChildComponent()).setText(string.replace("\\", "/"));
|
||
} else {
|
||
((TextFieldWithAutoCompletion)this.getChildComponent()).setText(null);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.config.Context
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.List;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.config.Context;
|
||
|
||
public class AddModelClassAnnotationPlugin
|
||
extends PluginAdapter {
|
||
public static final String a = "classAnnotionsHeaders";
|
||
private String b;
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
String[] stringArray;
|
||
for (String string : stringArray = this.b.split(",")) {
|
||
if (!StringUtils.isNotBlank((String)string)) continue;
|
||
topLevelClass.addImportedType(string);
|
||
String[] stringArray2 = string.split("\\.");
|
||
topLevelClass.addAnnotation("@" + stringArray2[stringArray2.length - 1]);
|
||
}
|
||
return true;
|
||
}
|
||
|
||
public void setContext(Context context) {
|
||
String string;
|
||
this.b = string = context.getProperty(a);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.ad.s_0;
|
||
import com.ccnode.codegenerator.mybatisGenerator.v;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import java.util.Arrays;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import java.util.Set;
|
||
import java.util.stream.Collectors;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class BaseClassPlugin
|
||
extends PluginAdapter {
|
||
public static final String var_java_lang_String_a = "modelSuperClass";
|
||
public static final String var_java_lang_String_b = "mapperSuperClass";
|
||
private List<String> var_java_util_List_java_lang_String__a;
|
||
private List<String> var_java_util_List_java_lang_String__b;
|
||
|
||
public BaseClassPlugin() {
|
||
this.var_java_lang_String_a = Lists.newArrayList();
|
||
this.var_java_lang_String_b = Lists.newArrayList();
|
||
}
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
Iterator iterator = this.var_java_lang_String_b.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
if (string.endsWith("<T>")) {
|
||
String string2 = string.replace("<T>", "");
|
||
interface_.addImportedType(new FullyQualifiedJavaType(string2));
|
||
} else {
|
||
interface_.addImportedType(new FullyQualifiedJavaType(string));
|
||
}
|
||
interface_.addSuperInterface(new FullyQualifiedJavaType(string.replace("<T>", "<" + introspectedTable.getBaseRecordType() + ">")));
|
||
}
|
||
return super.clientGenerated(interface_, topLevelClass, introspectedTable);
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
Object object;
|
||
Project project = this.var_java_lang_String_a.iterator();
|
||
while (project.hasNext()) {
|
||
object = (String)project.next();
|
||
topLevelClass.addImportedType(new FullyQualifiedJavaType((String)object));
|
||
topLevelClass.setSuperClass(new FullyQualifiedJavaType(((String)object).replace("<T>", "<" + introspectedTable.getBaseRecordType() + ">")));
|
||
}
|
||
project = v.a.get();
|
||
if (project != null) {
|
||
object = this.var_java_lang_String_a.iterator();
|
||
while (object.hasNext()) {
|
||
PsiClass psiClass;
|
||
String string = (String)object.next();
|
||
if (string.contains("<") && string.contains(">")) {
|
||
string = string.substring(0, string.indexOf("<"));
|
||
}
|
||
if ((psiClass = JavaPsiFacade.getInstance((Project)project).findClass(string, GlobalSearchScope.allScope((Project)project))) == null) continue;
|
||
PsiField[] psiFieldArray = psiClass.getAllFields();
|
||
Set set = Arrays.stream(psiFieldArray).map(PsiField::getName).collect(Collectors.toSet());
|
||
topLevelClass.getFields().removeIf(field -> set.contains(field.getName()));
|
||
topLevelClass.getMethods().removeIf(method -> set.contains(s_0.java_lang_String_a(method.getName())));
|
||
}
|
||
}
|
||
return super.modelBaseRecordClassGenerated(topLevelClass, introspectedTable);
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string;
|
||
super.setProperties(properties);
|
||
String string2 = this.properties.getProperty(var_java_lang_String_a);
|
||
if (StringUtility.stringHasValue((String)string2)) {
|
||
this.var_java_lang_String_a = Arrays.stream(string2.split(",")).collect(Collectors.toList());
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = this.properties.getProperty(var_java_lang_String_b)))) {
|
||
this.var_java_lang_String_b = Arrays.stream(string.split(",")).collect(Collectors.toList());
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.ListUtilities
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.XmlElementGeneratorTools;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.ListUtilities;
|
||
|
||
public class BatchInsertPlugin
|
||
extends PluginAdapter {
|
||
public static final String a = "batchInsert";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = FullyQualifiedJavaType.getNewListInstance();
|
||
fullyQualifiedJavaType.addTypeArgument(introspectedTable.getRules().calculateAllFieldsClass());
|
||
interface_.addImportedType(fullyQualifiedJavaType);
|
||
Method method = JavaElementGeneratorTools.a(a, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(new FullyQualifiedJavaType(fullyQualifiedJavaType.getShortName()), "list", "@Param(\"list\")"));
|
||
FormatTools.a(interface_, method);
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
String string = introspectedTable.getContext().getProperty("dbType");
|
||
if (string.equals("Oracle")) {
|
||
XmlElement xmlElement = new XmlElement("insert");
|
||
xmlElement.addAttribute(new Attribute("id", a));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement);
|
||
xmlElement.addElement((Element)new TextElement("insert all "));
|
||
XmlElement xmlElement2 = new XmlElement("foreach");
|
||
xmlElement2.addAttribute(new Attribute("collection", "list"));
|
||
xmlElement2.addAttribute(new Attribute("item", "item"));
|
||
xmlElement2.addElement((Element)new TextElement("into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
for (Element element : XmlElementGeneratorTools.a((List<IntrospectedColumn>)ListUtilities.removeIdentityAndGeneratedAlwaysColumns((List)introspectedTable.getAllColumns()), true)) {
|
||
xmlElement2.addElement(element);
|
||
}
|
||
xmlElement2.addElement((Element)new TextElement("values"));
|
||
for (Element element : XmlElementGeneratorTools.a((List<IntrospectedColumn>)ListUtilities.removeIdentityAndGeneratedAlwaysColumns((List)introspectedTable.getAllColumns()), "item.")) {
|
||
xmlElement2.addElement(element);
|
||
}
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
xmlElement.addElement((Element)new TextElement("select 1 from dual"));
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
} else {
|
||
XmlElement xmlElement = new XmlElement("insert");
|
||
xmlElement.addAttribute(new Attribute("id", a));
|
||
xmlElement.addAttribute(new Attribute("parameterType", "map"));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement);
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedTable);
|
||
xmlElement.addElement((Element)new TextElement("insert into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
for (Element element : XmlElementGeneratorTools.a((List<IntrospectedColumn>)ListUtilities.removeIdentityAndGeneratedAlwaysColumns((List)introspectedTable.getAllColumns()), true)) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
XmlElement xmlElement3 = new XmlElement("foreach");
|
||
xmlElement3.addAttribute(new Attribute("collection", "list"));
|
||
xmlElement3.addAttribute(new Attribute("item", "item"));
|
||
xmlElement3.addAttribute(new Attribute("separator", ","));
|
||
for (Element element : XmlElementGeneratorTools.a((List<IntrospectedColumn>)ListUtilities.removeIdentityAndGeneratedAlwaysColumns((List)introspectedTable.getAllColumns()), "item.")) {
|
||
xmlElement3.addElement(element);
|
||
}
|
||
xmlElement.addElement((Element)new TextElement("values"));
|
||
xmlElement.addElement((Element)xmlElement3);
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
}
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.ListUtilities
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.XmlElementGeneratorTools;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.ListUtilities;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
|
||
public class BatchInsertSelectiveUseDefaultForNull
|
||
extends PluginAdapter {
|
||
public static final String a = "batchInsertSelectiveUseDefaultForNull";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = FullyQualifiedJavaType.getNewListInstance();
|
||
fullyQualifiedJavaType.addTypeArgument(introspectedTable.getRules().calculateAllFieldsClass());
|
||
interface_.addImportedType(fullyQualifiedJavaType);
|
||
Method method = JavaElementGeneratorTools.a(a, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(new FullyQualifiedJavaType(fullyQualifiedJavaType.getShortName()), "list", "@Param(\"list\")"));
|
||
FormatTools.a(interface_, method);
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
String string = introspectedTable.getContext().getProperty("dbType");
|
||
List list = ListUtilities.removeIdentityAndGeneratedAlwaysColumns((List)introspectedTable.getAllColumns());
|
||
if (string.equals("Oracle")) {
|
||
XmlElement xmlElement = new XmlElement("insert");
|
||
xmlElement.addAttribute(new Attribute("id", a));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement);
|
||
xmlElement.addElement((Element)new TextElement("insert all "));
|
||
XmlElement xmlElement2 = new XmlElement("foreach");
|
||
xmlElement2.addAttribute(new Attribute("collection", "list"));
|
||
xmlElement2.addAttribute(new Attribute("item", "item"));
|
||
xmlElement2.addElement((Element)new TextElement("into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
for (Element element : XmlElementGeneratorTools.a((List<IntrospectedColumn>)list, true)) {
|
||
xmlElement2.addElement(element);
|
||
}
|
||
xmlElement2.addElement((Element)new TextElement("values"));
|
||
xmlElement2.addElement((Element)new TextElement("("));
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
Element element;
|
||
element = (IntrospectedColumn)list.get(i2);
|
||
XmlElement xmlElement3 = new XmlElement("choose");
|
||
XmlElement xmlElement4 = new XmlElement("when");
|
||
xmlElement4.addAttribute(new Attribute("test", "item." + element.getJavaProperty() + " != null"));
|
||
if (i2 != list.size() - 1) {
|
||
xmlElement4.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)element, (String)"item.") + ","));
|
||
} else {
|
||
xmlElement4.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)element, (String)"item.")));
|
||
}
|
||
xmlElement3.addElement((Element)xmlElement4);
|
||
XmlElement xmlElement5 = new XmlElement("otherwise");
|
||
StringBuilder stringBuilder = new StringBuilder("<!--");
|
||
stringBuilder.append("@ignoreSql");
|
||
stringBuilder.append("-->");
|
||
TextElement textElement = new TextElement(stringBuilder.toString());
|
||
xmlElement3.addElement((Element)textElement);
|
||
if (i2 != list.size() - 1) {
|
||
xmlElement5.addElement((Element)new TextElement("DEFAULT,"));
|
||
} else {
|
||
xmlElement5.addElement((Element)new TextElement("DEFAULT"));
|
||
}
|
||
xmlElement3.addElement((Element)xmlElement5);
|
||
xmlElement2.addElement((Element)xmlElement3);
|
||
}
|
||
xmlElement2.addElement((Element)new TextElement(")"));
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
xmlElement.addElement((Element)new TextElement("select 1 from dual"));
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
} else {
|
||
XmlElement xmlElement = new XmlElement("insert");
|
||
xmlElement.addAttribute(new Attribute("id", a));
|
||
xmlElement.addAttribute(new Attribute("parameterType", "map"));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement);
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedTable);
|
||
xmlElement.addElement((Element)new TextElement("insert into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
for (Element element : XmlElementGeneratorTools.a((List<IntrospectedColumn>)list, true)) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
XmlElement xmlElement6 = new XmlElement("foreach");
|
||
xmlElement6.addAttribute(new Attribute("collection", "list"));
|
||
xmlElement6.addAttribute(new Attribute("item", "item"));
|
||
xmlElement6.addAttribute(new Attribute("separator", ","));
|
||
xmlElement6.addElement((Element)new TextElement("("));
|
||
for (int i3 = 0; i3 < list.size(); ++i3) {
|
||
IntrospectedColumn introspectedColumn = (IntrospectedColumn)list.get(i3);
|
||
XmlElement xmlElement7 = new XmlElement("choose");
|
||
XmlElement xmlElement8 = new XmlElement("when");
|
||
xmlElement8.addAttribute(new Attribute("test", "item." + introspectedColumn.getJavaProperty() + " != null"));
|
||
if (i3 != list.size() - 1) {
|
||
xmlElement8.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item.") + ","));
|
||
} else {
|
||
xmlElement8.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item.")));
|
||
}
|
||
xmlElement7.addElement((Element)xmlElement8);
|
||
XmlElement xmlElement9 = new XmlElement("otherwise");
|
||
StringBuilder stringBuilder = new StringBuilder("<!--");
|
||
stringBuilder.append("@ignoreSql");
|
||
stringBuilder.append("-->");
|
||
TextElement textElement = new TextElement(stringBuilder.toString());
|
||
xmlElement7.addElement((Element)textElement);
|
||
if (i3 != list.size() - 1) {
|
||
xmlElement9.addElement((Element)new TextElement("DEFAULT,"));
|
||
} else {
|
||
xmlElement9.addElement((Element)new TextElement("DEFAULT"));
|
||
}
|
||
xmlElement7.addElement((Element)xmlElement9);
|
||
xmlElement6.addElement((Element)xmlElement7);
|
||
}
|
||
xmlElement6.addElement((Element)new TextElement(")"));
|
||
xmlElement.addElement((Element)new TextElement("values"));
|
||
xmlElement.addElement((Element)xmlElement6);
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
}
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.constants;
|
||
|
||
public final class JavaClientKey {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.constants;
|
||
|
||
public final class JavaClientValue {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.constants;
|
||
|
||
public class LombokConstants {
|
||
public static final String a = "@Data";
|
||
public static final String b = "@GetterSetter";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.constants;
|
||
|
||
public final class MapperXmlKey {
|
||
public static final String a = "select";
|
||
public static final String b = "insert";
|
||
public static final String c = "update";
|
||
public static final String d = "delete";
|
||
public static final String e = "sql";
|
||
public static final String f = "include";
|
||
public static final String g = "foreach";
|
||
public static final String h = "if";
|
||
public static final String i = "trim";
|
||
public static final String j = "set";
|
||
public static final String k = "id";
|
||
public static final String l = "parameterType";
|
||
public static final String m = "resultMap";
|
||
public static final String n = "refid";
|
||
public static final String o = "prefix";
|
||
public static final String p = "suffix";
|
||
public static final String q = "test";
|
||
public static final String r = "suffixOverrides";
|
||
public static final String s = "collection";
|
||
public static final String t = "item";
|
||
public static final String u = "separator";
|
||
public static final String v = "open";
|
||
public static final String w = "close";
|
||
public static final String x = "index";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.constants;
|
||
|
||
public final class MapperXmlValue {
|
||
public static final String a = "BaseResultMap";
|
||
public static final String b = "Base_Column_List";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.constants;
|
||
|
||
public final class StatementIdValue {
|
||
public static final String a = "findByIds";
|
||
public static final String b = "findAll";
|
||
public static final String c = "deleteByIds";
|
||
public static final String d = "saveBatch";
|
||
public static final String e = "updateBatch";
|
||
public static final String f = "updateBatchUseMultiQuery";
|
||
public static final String g = "updateBatchSelective";
|
||
public static final String h = "selectByPrimaryKey";
|
||
public static final String i = "findById";
|
||
public static final String j = "deleteByPrimaryKey";
|
||
public static final String k = "deleteById";
|
||
public static final String l = "insert";
|
||
public static final String m = "save";
|
||
public static final String n = "update";
|
||
public static final String o = "java.util.List";
|
||
public static final String p = "java.lang.Long";
|
||
public static final String q = "java.lang.Integer";
|
||
public static final String r = "java.lang.Short";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.ad.m;
|
||
import com.ccnode.codegenerator.ad.w_0;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d.e;
|
||
import com.google.common.collect.Lists;
|
||
import java.io.File;
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Arrays;
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import java.util.stream.Collectors;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class ControllerPlugin
|
||
extends PluginAdapter {
|
||
public static final String var_java_lang_String_a = "controllerPath";
|
||
public static final String b = "controllerPackage";
|
||
public static final String c = "servicePackage";
|
||
public static final String d = "javaModelName";
|
||
public static final String e = "javaModelPackage";
|
||
public static final String f = "tableName";
|
||
public static final String g = "templateString";
|
||
public static final String h = "mapperPackage";
|
||
public static final String i = "serviceInterfacePackage";
|
||
public static final String j = "mapperClassName";
|
||
public static final String k = "generateServiceInterface";
|
||
private String l;
|
||
private String m;
|
||
private String n;
|
||
private String o;
|
||
private String p;
|
||
private String q;
|
||
private String r;
|
||
private String s;
|
||
private String t;
|
||
private String u;
|
||
private boolean var_boolean_a;
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
String string;
|
||
File file;
|
||
String string2 = introspectedTable.getFullyQualifiedTableNameAtRuntime();
|
||
HashMap<String, Object> hashMap = new HashMap<String, Object>();
|
||
String string3 = string2;
|
||
String string4 = w_0.a.c(string2);
|
||
hashMap.put(f, string4);
|
||
hashMap.put("entityPackageName", this.o);
|
||
String string5 = this.n;
|
||
hashMap.put("entityClassName", string5);
|
||
String string6 = "com.service";
|
||
if (this.m != null) {
|
||
string6 = this.m;
|
||
}
|
||
hashMap.put("servicePackageName", string6);
|
||
hashMap.put(i, this.r);
|
||
if (StringUtils.isBlank((CharSequence)this.r) || !this.var_boolean_a) {
|
||
hashMap.put("serviceClassName", string5 + "Service");
|
||
} else {
|
||
hashMap.put("serviceClassName", string5 + "ServiceImpl");
|
||
hashMap.put("serviceInterfaceClassName", string5 + "Service");
|
||
}
|
||
hashMap.put("mapperPackageName", this.q);
|
||
hashMap.put(j, this.s);
|
||
hashMap.put(b, this.t);
|
||
hashMap.put("tableRemark", introspectedTable.getRemarks());
|
||
hashMap.put("myDate", new Date());
|
||
hashMap.put("simpleDateFormat", new SimpleDateFormat("yyyy-MM-dd"));
|
||
String string7 = com.ccnode.codegenerator.mybatisGenerator.d.e.a(this.p, hashMap);
|
||
String string8 = ControllerPlugin.java_lang_String_a(string7);
|
||
String string9 = this.n + "Controller.java";
|
||
if (string8 != null) {
|
||
string9 = string8 + ".java";
|
||
}
|
||
if ((file = new File(string = this.l + "/" + this.t.replace(".", "/") + "/" + string9)).exists()) {
|
||
return true;
|
||
}
|
||
com.ccnode.codegenerator.ad.m.c(string, Lists.newArrayList((Object[])new String[]{string7}), string9);
|
||
return true;
|
||
}
|
||
|
||
public static String java_lang_String_a(String string2) {
|
||
try {
|
||
int n2 = string2.indexOf("{");
|
||
String string3 = string2.substring(0, n2);
|
||
String[] stringArray = string3.split("[,!?\\s]+");
|
||
List list = Arrays.stream(stringArray).filter(string -> !StringUtils.isBlank((CharSequence)string)).collect(Collectors.toList());
|
||
for (int i2 = list.size() - 1; i2 >= 0; --i2) {
|
||
if (!((String)list.get(i2)).equals("class")) continue;
|
||
return (String)list.get(i2 + 1);
|
||
}
|
||
return null;
|
||
}
|
||
catch (Exception exception) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string;
|
||
String string2;
|
||
String string3;
|
||
String string4;
|
||
String string5;
|
||
String string6;
|
||
String string7;
|
||
String string8;
|
||
super.setProperties(properties);
|
||
String string9 = this.properties.getProperty(var_java_lang_String_a);
|
||
if (StringUtility.stringHasValue((String)string9)) {
|
||
this.l = string9;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string8 = this.properties.getProperty(c)))) {
|
||
this.m = string8;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string7 = this.properties.getProperty(d)))) {
|
||
this.n = string7;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string6 = this.properties.getProperty(e)))) {
|
||
this.o = string6;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string5 = this.properties.getProperty(i)))) {
|
||
this.r = string5;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string4 = this.properties.getProperty(g)))) {
|
||
this.p = string4;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string3 = this.properties.getProperty(h)))) {
|
||
this.q = string3;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string2 = this.properties.getProperty(j)))) {
|
||
this.s = string2;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = this.properties.getProperty(b)))) {
|
||
this.t = string;
|
||
}
|
||
this.var_boolean_a = StringUtility.isTrue((String)this.properties.getProperty(k));
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.PluginUtils;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
|
||
public class CustomzedMethodsPlugin
|
||
extends PluginAdapter {
|
||
private boolean var_boolean_a = true;
|
||
private boolean var_boolean_b = true;
|
||
private boolean var_boolean_c = true;
|
||
private boolean var_boolean_d = true;
|
||
private boolean var_boolean_e = true;
|
||
private boolean var_boolean_f = true;
|
||
public static String var_java_lang_String_a;
|
||
public static String var_java_lang_String_b;
|
||
public static String var_java_lang_String_c;
|
||
public static String var_java_lang_String_d;
|
||
public static String var_java_lang_String_e;
|
||
public static String var_java_lang_String_f;
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientInsertMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public boolean clientInsertSelectiveMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_b;
|
||
}
|
||
|
||
public boolean clientSelectByPrimaryKeyMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_d;
|
||
}
|
||
|
||
public boolean clientDeleteByPrimaryKeyMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_e;
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_e;
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_f;
|
||
}
|
||
|
||
public boolean sqlMapInsertElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_a;
|
||
}
|
||
|
||
public boolean sqlMapInsertSelectiveElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_b;
|
||
}
|
||
|
||
public boolean sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_f;
|
||
}
|
||
|
||
public boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_e;
|
||
}
|
||
|
||
public boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_e;
|
||
}
|
||
|
||
public boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_d;
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
this.var_boolean_a = PluginUtils.a(var_java_lang_String_a, properties);
|
||
this.var_boolean_b = PluginUtils.a(var_java_lang_String_b, properties);
|
||
this.var_boolean_c = PluginUtils.a(var_java_lang_String_c, properties);
|
||
this.var_boolean_d = PluginUtils.a(var_java_lang_String_d, properties);
|
||
this.var_boolean_e = PluginUtils.a(var_java_lang_String_e, properties);
|
||
this.var_boolean_f = PluginUtils.a(var_java_lang_String_f, properties);
|
||
super.setProperties(properties);
|
||
}
|
||
|
||
static {
|
||
var_java_lang_String_a = "INSERTMETHODENABLED";
|
||
var_java_lang_String_b = "INSERTSELECTIVEMETHODENABLED";
|
||
var_java_lang_String_c = "DELETEBYPRIMARYKEYENABLED";
|
||
var_java_lang_String_d = "SELECTBYPRIMARYKEYENABLED";
|
||
var_java_lang_String_e = "UPDATEBYPRIMARYKEYENABLED";
|
||
var_java_lang_String_f = "UPDATEBYPRIMARYKEYSELECTIVEENABLED";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
|
||
public class DeleteByPrimaryKeyInPlugin
|
||
extends PluginAdapter {
|
||
private FullyQualifiedJavaType var_org_mybatis_generator_api_dom_java_FullyQualifiedJavaType_a = new FullyQualifiedJavaType("java.util.List");
|
||
public static final String var_java_lang_String_a = "deleteByPrimaryKeyIn";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
List list;
|
||
if (introspectedTable.hasPrimaryKeyColumns() && (list = introspectedTable.getPrimaryKeyColumns()).size() == 1) {
|
||
XmlElement xmlElement = new XmlElement("delete");
|
||
xmlElement.addAttribute(new Attribute("id", var_java_lang_String_a));
|
||
this.context.getCommentGenerator().addComment(xmlElement);
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append("delete from ");
|
||
stringBuilder.append(introspectedTable.getFullyQualifiedTableNameAtRuntime());
|
||
IntrospectedColumn introspectedColumn = (IntrospectedColumn)list.get(0);
|
||
String string = introspectedColumn.getActualColumnName();
|
||
stringBuilder.append(" where ");
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn));
|
||
stringBuilder.append(" in ");
|
||
xmlElement.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
XmlElement xmlElement2 = new XmlElement("foreach");
|
||
xmlElement2.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement2.getAttributes().add(1, new Attribute("item", introspectedColumn.getJavaProperty()));
|
||
xmlElement2.getAttributes().add(1, new Attribute("open", "("));
|
||
xmlElement2.getAttributes().add(2, new Attribute("separator", ", "));
|
||
xmlElement2.getAttributes().add(1, new Attribute("close", ")"));
|
||
xmlElement2.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn)));
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
}
|
||
return super.sqlMapDocumentGenerated(document, introspectedTable);
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = new FullyQualifiedJavaType(this.var_org_mybatis_generator_api_dom_java_FullyQualifiedJavaType_a.getShortName());
|
||
IntrospectedColumn introspectedColumn = (IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0);
|
||
FullyQualifiedJavaType fullyQualifiedJavaType2 = introspectedColumn.getFullyQualifiedJavaType();
|
||
fullyQualifiedJavaType.addTypeArgument(fullyQualifiedJavaType2);
|
||
Method method = JavaElementGeneratorTools.a(var_java_lang_String_a, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(fullyQualifiedJavaType, "list"));
|
||
method.setReturnType(new FullyQualifiedJavaType("int"));
|
||
interface_.addImportedType(this.var_org_mybatis_generator_api_dom_java_FullyQualifiedJavaType_a);
|
||
FormatTools.a(interface_, method);
|
||
}
|
||
return super.clientGenerated(interface_, topLevelClass, introspectedTable);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.Plugin$ModelClassType
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.List;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.Plugin;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class GenerateOpenApiDoc
|
||
extends PluginAdapter {
|
||
public static final String a = "$";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
String string;
|
||
Object object;
|
||
String string2 = introspectedTable.getRemarks();
|
||
if (StringUtils.isBlank((String)string2)) {
|
||
object = "@Schema";
|
||
} else {
|
||
string = String.valueOf(topLevelClass.getType());
|
||
object = "@Schema(description=\"" + string2 + "\")";
|
||
}
|
||
if (!topLevelClass.getAnnotations().contains(object)) {
|
||
topLevelClass.addAnnotation((String)object);
|
||
}
|
||
string = "io.swagger.v3.oas.annotations.media.Schema";
|
||
topLevelClass.addImportedType(string);
|
||
String string3 = this.properties.getProperty("javaDoc", "false");
|
||
String string4 = "";
|
||
if (introspectedColumn.getRemarks() != null) {
|
||
string4 = introspectedColumn.getRemarks();
|
||
}
|
||
field.addAnnotation("@Schema(description=\"" + string4 + "\")");
|
||
return super.modelFieldGenerated(field, topLevelClass, introspectedColumn, introspectedTable, modelClassType);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.google.common.collect.Sets
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.vfs.LocalFileSystem
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiJavaFile
|
||
* com.intellij.psi.PsiManager
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.ad.m;
|
||
import com.ccnode.codegenerator.ad.n;
|
||
import com.ccnode.codegenerator.freemarker.b;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d.c;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.PluginUtils;
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import com.ccnode.codegenerator.mybatisGenerator.v;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.google.common.collect.Sets;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiJavaFile;
|
||
import com.intellij.psi.PsiManager;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import java.io.File;
|
||
import java.util.HashMap;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class GenerateServicePlugin
|
||
extends PluginAdapter {
|
||
public static final String var_java_lang_String_a = "Mapper";
|
||
public static final String var_java_lang_String_b = "serviceSrcFolder";
|
||
public static final String c = "servicePackageName";
|
||
public static final String d = "useMybatisPlus";
|
||
public static final String e = "generateServiceInterface";
|
||
public static final String f = "serviceInterfacePackageName";
|
||
public static final String g = "serviceInterfaceSrcFolder";
|
||
public static final String h = "serviceName";
|
||
public static final String i = "serviceInterfaceName";
|
||
public static final String j = "TRUE";
|
||
private String m;
|
||
private String n;
|
||
private boolean var_boolean_a = false;
|
||
private boolean var_boolean_b = false;
|
||
private String o;
|
||
private String p;
|
||
public String k;
|
||
public String l;
|
||
|
||
public boolean boolean_a() {
|
||
return this.var_boolean_b;
|
||
}
|
||
|
||
public void a(boolean bl) {
|
||
this.var_boolean_b = bl;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.o;
|
||
}
|
||
|
||
public void void_a(String string) {
|
||
this.o = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.p;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.p = string;
|
||
}
|
||
|
||
public String c() {
|
||
return this.m;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.m = string;
|
||
}
|
||
|
||
public String d() {
|
||
return this.n;
|
||
}
|
||
|
||
public void d(String string) {
|
||
this.n = string;
|
||
}
|
||
|
||
public String e() {
|
||
return this.k;
|
||
}
|
||
|
||
public void e(String string) {
|
||
this.k = string;
|
||
}
|
||
|
||
public String f() {
|
||
return this.l;
|
||
}
|
||
|
||
public void f(String string) {
|
||
this.l = string;
|
||
}
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
Object object;
|
||
Object object2;
|
||
String string;
|
||
String string2;
|
||
String string3 = interface_.getType().getShortName();
|
||
String string4 = com.ccnode.codegenerator.ad.n.f(interface_.getType().getShortName());
|
||
String string5 = interface_.getType().getFullyQualifiedName();
|
||
String string6 = "";
|
||
String string7 = "";
|
||
HashSet hashSet = Sets.newHashSet();
|
||
HashSet hashSet2 = Sets.newHashSet();
|
||
hashSet.add(interface_.getType().getFullyQualifiedName());
|
||
if (!this.var_boolean_b) {
|
||
string6 = this.k;
|
||
} else {
|
||
string6 = this.k;
|
||
string7 = this.l;
|
||
}
|
||
String string8 = this.m.replace(".", "/");
|
||
HashMap hashMap = Maps.newHashMap();
|
||
hashMap.put("servicePackage", this.m);
|
||
hashMap.put("serviceType", string6);
|
||
hashMap.put("daoType", interface_.getType().getShortName());
|
||
hashMap.put("daoName", string4);
|
||
hashMap.put("imports", hashSet);
|
||
String string9 = introspectedTable.getContext().getProperty(com.ccnode.codegenerator.mybatisGenerator.d.c.a);
|
||
boolean bl = false;
|
||
if (StringUtils.isNotBlank((String)string9) && string9.equals("true")) {
|
||
bl = true;
|
||
}
|
||
if (bl) {
|
||
hashMap.put("jakataAnnotation", true);
|
||
}
|
||
hashMap.put("useServiceInterface", this.var_boolean_b);
|
||
hashMap.put("serviceInterfaceImport", hashSet2);
|
||
if (this.var_boolean_b) {
|
||
hashMap.put(i, string7);
|
||
hashMap.put("serviceFullName", this.o + "." + string7);
|
||
}
|
||
if (StringUtils.isNotBlank((String)(string2 = u.b(string6, this.m)))) {
|
||
hashMap.put("fileHeader", string2);
|
||
}
|
||
if (this.var_boolean_b && StringUtils.isNotBlank((String)(string = u.b(string7, this.o)))) {
|
||
hashMap.put("serviceInterfaceFileHeader", string);
|
||
}
|
||
string = "";
|
||
String string10 = "";
|
||
List list = interface_.getMethods();
|
||
for (Object object3 : list) {
|
||
object2 = object3.getParameters();
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = object2.iterator();
|
||
while (fullyQualifiedJavaType.hasNext()) {
|
||
Parameter parameter = (Parameter)fullyQualifiedJavaType.next();
|
||
FullyQualifiedJavaType fullyQualifiedJavaType2 = parameter.getType();
|
||
hashSet.addAll(fullyQualifiedJavaType2.getImportList());
|
||
if (fullyQualifiedJavaType2.getFullyQualifiedName().startsWith("List<")) {
|
||
hashSet.add("java.util.List");
|
||
}
|
||
hashSet2.addAll(fullyQualifiedJavaType2.getImportList());
|
||
if (!fullyQualifiedJavaType2.getFullyQualifiedName().startsWith("List<")) continue;
|
||
hashSet2.add("java.util.List");
|
||
}
|
||
fullyQualifiedJavaType = object3.getReturnType();
|
||
if (fullyQualifiedJavaType == null) continue;
|
||
hashSet.addAll(fullyQualifiedJavaType.getImportList());
|
||
hashSet2.addAll(fullyQualifiedJavaType.getImportList());
|
||
if (!fullyQualifiedJavaType.getFullyQualifiedName().startsWith("List<")) continue;
|
||
hashSet.add("java.util.List");
|
||
hashSet2.add("java.util.List");
|
||
}
|
||
if (interface_.getSuperClass() != null) {
|
||
// empty if block
|
||
}
|
||
hashMap.put("methods", list);
|
||
if (this.var_boolean_a) {
|
||
object = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
|
||
hashSet.add(object.getFullyQualifiedName());
|
||
hashSet2.add(object.getFullyQualifiedName());
|
||
hashMap.put("entityName", object.getShortName());
|
||
if (PluginUtils.a("useMybatisPlus3", introspectedTable.getContext().getProperties())) {
|
||
hashMap.put("mybatisplus3", true);
|
||
} else {
|
||
hashMap.put("mybatisplus3", false);
|
||
}
|
||
string = com.ccnode.codegenerator.freemarker.b.b("mybatisGenerator/mybatisplus_service.ftl", hashMap);
|
||
if (this.var_boolean_b) {
|
||
hashMap.put(f, this.o);
|
||
string10 = com.ccnode.codegenerator.freemarker.b.b("mybatisGenerator/mybatisplus_serviceInterface.ftl", hashMap);
|
||
}
|
||
} else {
|
||
string = com.ccnode.codegenerator.freemarker.b.b("mybatisGenerator/service.ftl", hashMap);
|
||
if (this.var_boolean_b) {
|
||
hashMap.put(f, this.o);
|
||
string10 = com.ccnode.codegenerator.freemarker.b.b("mybatisGenerator/serviceInterface.ftl", hashMap);
|
||
}
|
||
}
|
||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||
// empty if block
|
||
}
|
||
object = (this.n + "/" + string8 + "/" + string6).replace("\\", "/") + ".java";
|
||
this.a(string6, string, (String)object, this.m);
|
||
if (this.var_boolean_b) {
|
||
Object object3;
|
||
object3 = this.o.replace(".", "/");
|
||
object2 = (this.p + "/" + (String)object3 + "/" + string7).replace("\\", "/") + ".java";
|
||
this.a(string7, string10, (String)object2, this.o);
|
||
}
|
||
return true;
|
||
}
|
||
|
||
private void a(String string, String string2, String string3, String string4) {
|
||
File file = new File(string3);
|
||
if (file.exists()) {
|
||
Project project = v.a.get();
|
||
VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByIoFile(file);
|
||
if (virtualFile != null) {
|
||
String string5;
|
||
PsiClass psiClass;
|
||
PsiFile psiFile = PsiManager.getInstance((Project)project).findFile(virtualFile);
|
||
if (psiFile instanceof PsiJavaFile && (psiClass = ((PsiJavaFile)psiFile).getClasses()[0]) != null && (string5 = com.ccnode.codegenerator.mybatisGenerator.d.b.b(string2, psiClass, project)) != null) {
|
||
com.ccnode.codegenerator.ad.m.c(string3, Lists.newArrayList((Object[])new String[]{string5}), string);
|
||
}
|
||
} else {
|
||
String string6;
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass(string4 + "." + string, GlobalSearchScope.allScope((Project)project));
|
||
if (psiClass != null && (string6 = com.ccnode.codegenerator.mybatisGenerator.d.b.b(string2, psiClass, project)) != null) {
|
||
com.ccnode.codegenerator.ad.m.c(string3, Lists.newArrayList((Object[])new String[]{string6}), string);
|
||
}
|
||
}
|
||
} else {
|
||
com.ccnode.codegenerator.ad.m.a(string3, Lists.newArrayList((Object[])new String[]{string2}), string);
|
||
}
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string;
|
||
String string2;
|
||
String string3;
|
||
String string4;
|
||
String string5;
|
||
String string6;
|
||
String string7;
|
||
super.setProperties(properties);
|
||
String string8 = this.properties.getProperty(var_java_lang_String_b);
|
||
if (StringUtility.stringHasValue((String)string8)) {
|
||
this.n = string8;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string7 = this.properties.getProperty(c)))) {
|
||
this.m = string7;
|
||
}
|
||
if (GenerateServicePlugin.boolean_a(string6 = this.properties.getProperty(d))) {
|
||
this.var_boolean_a = true;
|
||
}
|
||
if (GenerateServicePlugin.boolean_a(string5 = this.properties.getProperty(e))) {
|
||
this.var_boolean_b = true;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string4 = this.properties.getProperty(f)))) {
|
||
this.o = string4;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string3 = this.properties.getProperty(g)))) {
|
||
this.p = string3;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string2 = this.properties.getProperty(h)))) {
|
||
this.k = string2;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = this.properties.getProperty(i)))) {
|
||
this.l = string;
|
||
}
|
||
}
|
||
|
||
public static boolean boolean_a(String string) {
|
||
return StringUtility.stringHasValue((String)string) && string.equalsIgnoreCase(j);
|
||
}
|
||
|
||
public void b(boolean bl) {
|
||
this.var_boolean_a = bl;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.Plugin$ModelClassType
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.Plugin;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class GenerateSwagger3Doc
|
||
extends PluginAdapter {
|
||
public static final String a = "$";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
String string;
|
||
Object object;
|
||
boolean bl = Boolean.parseBoolean(this.properties.getProperty("useFullPathName", "false"));
|
||
if (!bl) {
|
||
object = "@ApiModel";
|
||
} else {
|
||
string = String.valueOf(topLevelClass.getType());
|
||
object = "@ApiModel(value=\"" + string.replace(".", a) + "\")";
|
||
}
|
||
string = this.properties.getProperty("generatorJavaDoc", "TRUE");
|
||
String string2 = this.properties.getProperty("generatorSwaggerDoc", "TRUE");
|
||
if ("TRUE".equals(string.toUpperCase())) {
|
||
this.a(field, introspectedColumn);
|
||
}
|
||
if ("TRUE".equals(string2.toUpperCase())) {
|
||
this.a(topLevelClass, field, (String)object, introspectedColumn);
|
||
}
|
||
return super.modelFieldGenerated(field, topLevelClass, introspectedColumn, introspectedTable, modelClassType);
|
||
}
|
||
|
||
private void a(TopLevelClass topLevelClass, Field field, String string, IntrospectedColumn introspectedColumn) {
|
||
String string2 = this.properties.getProperty("apiModelAnnotationPackage");
|
||
String string3 = this.properties.getProperty("apiModelPropertyAnnotationPackage");
|
||
if (null == string2) {
|
||
string2 = "io.swagger.annotations.ApiModel";
|
||
}
|
||
if (null == string3) {
|
||
string3 = "io.swagger.annotations.ApiModelProperty";
|
||
}
|
||
if (!topLevelClass.getAnnotations().contains(string)) {
|
||
topLevelClass.addAnnotation(string);
|
||
}
|
||
topLevelClass.addImportedType(string2);
|
||
topLevelClass.addImportedType(string3);
|
||
String string4 = "";
|
||
if (introspectedColumn.getRemarks() != null) {
|
||
string4 = introspectedColumn.getRemarks();
|
||
}
|
||
field.addAnnotation("@ApiModelProperty(value=\"" + string4 + "\")");
|
||
}
|
||
|
||
private void a(Field field, IntrospectedColumn introspectedColumn) {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.Plugin$ModelClassType
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.Plugin;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class GeneratorSwagger2Doc
|
||
extends PluginAdapter {
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
Object object = "";
|
||
if (introspectedTable != null) {
|
||
object = introspectedTable.getRemarks() != null ? "@ApiModel(description=\"" + introspectedTable.getRemarks() + "\")" : "@ApiModel(description=\"" + introspectedTable.getFullyQualifiedTableNameAtRuntime() + "\")";
|
||
}
|
||
if (!topLevelClass.getAnnotations().contains(object)) {
|
||
topLevelClass.addAnnotation((String)object);
|
||
}
|
||
String string = this.properties.getProperty("apiModelAnnotationPackage");
|
||
String string2 = this.properties.getProperty("apiModelPropertyAnnotationPackage");
|
||
if (null == string) {
|
||
string = "io.swagger.annotations.ApiModel";
|
||
}
|
||
if (null == string2) {
|
||
string2 = "io.swagger.annotations.ApiModelProperty";
|
||
}
|
||
topLevelClass.addImportedType(string);
|
||
topLevelClass.addImportedType(string2);
|
||
String string3 = introspectedColumn.getRemarks();
|
||
if (string3 == null) {
|
||
string3 = "";
|
||
}
|
||
string3 = string3.replace("\r\n", ",").replace("\n", ",");
|
||
string3 = string3.replace("\"", "'");
|
||
field.addAnnotation("@ApiModelProperty(value=\"" + string3 + "\")");
|
||
return super.modelFieldGenerated(field, topLevelClass, introspectedColumn, introspectedTable, modelClassType);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.util.ReflectionUtil
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.NameUtils;
|
||
import com.intellij.util.ReflectionUtil;
|
||
import java.lang.reflect.Field;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.HashMap;
|
||
import java.util.HashSet;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.Random;
|
||
import java.util.Set;
|
||
|
||
public class GlobalTool
|
||
extends NameUtils {
|
||
private static volatile GlobalTool var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a;
|
||
private static final long var_long_a = 100000000000000000L;
|
||
public static final String var_java_lang_String_a = "[һ-<2D><><FD>C<A8><43><A1><AA><A1><AE><A1><AF><A1><B0><A1><B1><A1><AD><A1><A2><A1><A3><A1><B4><A1><B5><A1><B6><A1><B7><A1><B8><A1><B9><A1><BA><A1><BB><A1><BE><A1><BF><A1><B2><A1><B3><A3><A1><A3><A8><A3><A9><A3><AC><A3><AE><A3><BA><A3><BB>]";
|
||
|
||
private GlobalTool() {
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static GlobalTool com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a() {
|
||
if (var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a != null) return var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a;
|
||
Class<GlobalTool> clazz = GlobalTool.class;
|
||
synchronized (GlobalTool.class) {
|
||
if (var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a != null) return var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a;
|
||
var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a = new GlobalTool();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return var_com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a;
|
||
}
|
||
}
|
||
|
||
public Set<?> a(Object ... objectArray) {
|
||
return objectArray == null ? new HashSet() : new HashSet<Object>(Arrays.asList(objectArray));
|
||
}
|
||
|
||
public List<?> a(Object ... objectArray) {
|
||
return objectArray == null ? new ArrayList() : new ArrayList<Object>(Arrays.asList(objectArray));
|
||
}
|
||
|
||
public Map<?, ?> a() {
|
||
return new LinkedHashMap();
|
||
}
|
||
|
||
public Map<?, ?> b() {
|
||
return new HashMap(16);
|
||
}
|
||
|
||
public Object a(Object object, String string) {
|
||
if (object == null) {
|
||
return null;
|
||
}
|
||
Class<?> clazz = object.getClass();
|
||
return ReflectionUtil.getField(clazz, (Object)object, Object.class, (String)string);
|
||
}
|
||
|
||
public void void_a(Object ... objectArray) {
|
||
}
|
||
|
||
private List<Field> a(Class<?> clazz) {
|
||
ArrayList<Field> arrayList = new ArrayList<Field>();
|
||
do {
|
||
arrayList.addAll(Arrays.asList(clazz.getDeclaredFields()));
|
||
} while (!(clazz = clazz.getSuperclass()).equals(Object.class));
|
||
return arrayList;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
Random random = new Random();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (random.nextFloat() > 0.5f) {
|
||
stringBuilder.append("-");
|
||
}
|
||
stringBuilder.append(random.nextInt(9) + 1);
|
||
do {
|
||
stringBuilder.append(random.nextInt(10));
|
||
} while (stringBuilder.length() < 18);
|
||
stringBuilder.append("L");
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
public String a(String string) {
|
||
return this.a(string, false);
|
||
}
|
||
|
||
public String a(String string, Boolean bl) {
|
||
if (null == string) {
|
||
return null;
|
||
}
|
||
if (string.length() <= 0) {
|
||
return null;
|
||
}
|
||
if (null == bl) {
|
||
bl = false;
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (bl.booleanValue()) {
|
||
for (char c2 : string.toCharArray()) {
|
||
stringBuilder.append(String.format("\\u%04x", c2));
|
||
}
|
||
} else {
|
||
for (char c3 : string.toCharArray()) {
|
||
if (String.valueOf(c3).matches(var_java_lang_String_a)) {
|
||
stringBuilder.append(String.format("\\u%04x", c3));
|
||
continue;
|
||
}
|
||
stringBuilder.append(c3);
|
||
}
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class JoinPlugin
|
||
extends PluginAdapter {
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = this.b(introspectedTable);
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
XmlElement xmlElement2 = this.a(introspectedTable);
|
||
document.getRootElement().addElement((Element)xmlElement2);
|
||
return super.sqlMapDocumentGenerated(document, introspectedTable);
|
||
}
|
||
|
||
private XmlElement a(IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = new XmlElement("resultMap");
|
||
xmlElement.addAttribute(new Attribute("id", "JoinResultMap"));
|
||
String string = introspectedTable.getBaseRecordType();
|
||
xmlElement.addAttribute(new Attribute("type", string));
|
||
this.context.getCommentGenerator().addComment(xmlElement);
|
||
this.a(xmlElement, introspectedTable);
|
||
return xmlElement;
|
||
}
|
||
|
||
@NotNull
|
||
private XmlElement b(IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = new XmlElement("sql");
|
||
xmlElement.addAttribute(new Attribute("id", "Join_Column_List"));
|
||
this.context.getCommentGenerator().addComment(xmlElement);
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
Iterator iterator = introspectedTable.getNonBLOBColumns().iterator();
|
||
while (iterator.hasNext()) {
|
||
IntrospectedColumn introspectedColumn = (IntrospectedColumn)iterator.next();
|
||
stringBuilder.append(introspectedTable.getTableConfiguration().getTableName() + "." + MyBatis3FormattingUtilities.getSelectListPhrase((IntrospectedColumn)introspectedColumn) + " as " + u.java_lang_String_a(introspectedTable.getTableConfiguration().getTableName()) + "_" + introspectedColumn.getActualColumnName());
|
||
if (iterator.hasNext()) {
|
||
stringBuilder.append(", ");
|
||
}
|
||
if (stringBuilder.length() <= 80) continue;
|
||
xmlElement.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
stringBuilder.setLength(0);
|
||
}
|
||
if (stringBuilder.length() > 0) {
|
||
xmlElement.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
}
|
||
return xmlElement;
|
||
}
|
||
|
||
private void a(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement2;
|
||
Object object2;
|
||
String string = introspectedTable.getContext().getProperty("noJdbcType");
|
||
boolean bl = !StringUtility.stringHasValue((String)string) || !string.equalsIgnoreCase("true");
|
||
for (Object object2 : introspectedTable.getPrimaryKeyColumns()) {
|
||
xmlElement2 = new XmlElement("id");
|
||
xmlElement2.addAttribute(new Attribute("column", u.java_lang_String_a(introspectedTable.getTableConfiguration().getTableName()) + "_" + object2.getActualColumnName()));
|
||
xmlElement2.addAttribute(new Attribute("property", object2.getJavaProperty()));
|
||
if (bl) {
|
||
xmlElement2.addAttribute(new Attribute("jdbcType", object2.getJdbcTypeName()));
|
||
}
|
||
if (StringUtility.stringHasValue((String)object2.getTypeHandler())) {
|
||
xmlElement2.addAttribute(new Attribute("typeHandler", object2.getTypeHandler()));
|
||
}
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
}
|
||
List list = introspectedTable.getNonPrimaryKeyColumns();
|
||
object2 = list.iterator();
|
||
while (object2.hasNext()) {
|
||
xmlElement2 = (IntrospectedColumn)object2.next();
|
||
XmlElement xmlElement3 = new XmlElement("result");
|
||
xmlElement3.addAttribute(new Attribute("column", u.java_lang_String_a(introspectedTable.getTableConfiguration().getTableName()) + "_" + xmlElement2.getActualColumnName()));
|
||
xmlElement3.addAttribute(new Attribute("property", xmlElement2.getJavaProperty()));
|
||
if (bl) {
|
||
xmlElement3.addAttribute(new Attribute("jdbcType", xmlElement2.getJdbcTypeName()));
|
||
}
|
||
if (StringUtility.stringHasValue((String)xmlElement2.getTypeHandler())) {
|
||
xmlElement3.addAttribute(new Attribute("typeHandler", xmlElement2.getTypeHandler()));
|
||
}
|
||
xmlElement.addElement((Element)xmlElement3);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.Plugin$ModelClassType
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.Plugin;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class LombokCustomizedPlugin
|
||
extends PluginAdapter {
|
||
public static final String a = "thevalue";
|
||
private String b;
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
if (StringUtils.isNotBlank((CharSequence)this.b)) {
|
||
String[] stringArray = this.b.split("\n");
|
||
try {
|
||
for (String string : stringArray) {
|
||
if (!StringUtils.isNotBlank((CharSequence)string)) continue;
|
||
topLevelClass.addImportedType(LombokCustomizedPlugin.a(string.trim()));
|
||
topLevelClass.addAnnotation(LombokCustomizedPlugin.b(string.trim()));
|
||
}
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
return false;
|
||
}
|
||
|
||
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
return false;
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string = properties.getProperty(a);
|
||
if (StringUtility.stringHasValue((String)string)) {
|
||
this.b = string;
|
||
}
|
||
}
|
||
|
||
private String a(Date date) {
|
||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
|
||
return simpleDateFormat.format(date);
|
||
}
|
||
|
||
public static String a(String string) {
|
||
if (string != null) {
|
||
int n2;
|
||
if (string.startsWith("@")) {
|
||
string = string.substring(1);
|
||
}
|
||
return (n2 = string.lastIndexOf(40)) == -1 ? string : string.substring(0, n2);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@NotNull
|
||
public static String b(@NotNull String string) {
|
||
int n2;
|
||
String string2;
|
||
int n3 = string.lastIndexOf("(");
|
||
String string3 = string;
|
||
if (n3 != -1) {
|
||
string3 = string.substring(0, n3);
|
||
}
|
||
String string4 = string2 = (n2 = string3.lastIndexOf(46)) == -1 ? string : string.substring(n2 + 1);
|
||
if (!string2.startsWith("@")) {
|
||
return "@" + string2;
|
||
}
|
||
return string2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.Plugin$ModelClassType
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.PluginUtils;
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.Plugin;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class LombokDataPlugin
|
||
extends PluginAdapter {
|
||
private boolean var_boolean_a = false;
|
||
public static final String var_java_lang_String_a = "has_super";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
topLevelClass.addImportedType("lombok.Data");
|
||
topLevelClass.addAnnotation("@Data");
|
||
if (this.var_boolean_a) {
|
||
topLevelClass.addImportedType("lombok.EqualsAndHashCode");
|
||
topLevelClass.addAnnotation("@EqualsAndHashCode(callSuper=true)");
|
||
}
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
return false;
|
||
}
|
||
|
||
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
return false;
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string = properties.getProperty(var_java_lang_String_a);
|
||
if (PluginUtils.a(string)) {
|
||
this.var_boolean_a = true;
|
||
}
|
||
}
|
||
|
||
private String a(Date date) {
|
||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
|
||
return simpleDateFormat.format(date);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.Plugin$ModelClassType
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.Plugin;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class LombokGetterSetterPlugin
|
||
extends PluginAdapter {
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
topLevelClass.addImportedType("lombok.Getter");
|
||
topLevelClass.addImportedType("lombok.Setter");
|
||
topLevelClass.addAnnotation("@Getter");
|
||
topLevelClass.addAnnotation("@Setter");
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
return false;
|
||
}
|
||
|
||
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType) {
|
||
return false;
|
||
}
|
||
|
||
private String a(Date date) {
|
||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
|
||
return simpleDateFormat.format(date);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.java.CompilationUnit
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.InnerClass
|
||
* org.mybatis.generator.api.dom.java.InnerEnum
|
||
* org.mybatis.generator.api.dom.java.JavaElement
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.m;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.MyCommentGenerator;
|
||
import java.util.Properties;
|
||
import java.util.Set;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.java.CompilationUnit;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.InnerClass;
|
||
import org.mybatis.generator.api.dom.java.InnerEnum;
|
||
import org.mybatis.generator.api.dom.java.JavaElement;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class MybatisPlusCommnetGenerator
|
||
extends MyCommentGenerator {
|
||
private String var_java_lang_String_b = "";
|
||
private String var_java_lang_String_c = "";
|
||
private boolean var_boolean_b;
|
||
private String d;
|
||
public static final String a = "FIELD_FILL";
|
||
private boolean var_boolean_c;
|
||
|
||
@Override
|
||
public void addJavaFileComment(CompilationUnit compilationUnit) {
|
||
super.addJavaFileComment(compilationUnit);
|
||
}
|
||
|
||
@Override
|
||
public void addComment(XmlElement xmlElement) {
|
||
super.addComment(xmlElement);
|
||
}
|
||
|
||
@Override
|
||
public void addRootComment(XmlElement xmlElement) {
|
||
}
|
||
|
||
@Override
|
||
public void addConfigurationProperties(Properties properties) {
|
||
boolean bl;
|
||
String string;
|
||
String string2;
|
||
String string3;
|
||
String string4 = properties.getProperty("beginningDelimiter");
|
||
if (StringUtility.stringHasValue((String)string4)) {
|
||
this.var_java_lang_String_b = string4;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string3 = properties.getProperty("endingDelimiter")))) {
|
||
this.var_java_lang_String_c = string3;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string2 = properties.getProperty("forceAnnotation")))) {
|
||
this.var_boolean_b = string2.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = properties.getProperty("mybatisplusIdType")))) {
|
||
this.d = string;
|
||
}
|
||
this.var_boolean_c = bl = StringUtility.isTrue((String)properties.getProperty(a));
|
||
super.addConfigurationProperties(properties);
|
||
}
|
||
|
||
public String a(String string) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(this.var_java_lang_String_b);
|
||
stringBuilder.append(string);
|
||
stringBuilder.append(this.var_java_lang_String_c);
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
@Override
|
||
protected void addJavadocTag(JavaElement javaElement, boolean bl) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(" * ");
|
||
stringBuilder.append("@mbg.generated");
|
||
if (bl) {
|
||
stringBuilder.append(" do_not_delete_during_merge");
|
||
}
|
||
javaElement.addJavaDocLine(stringBuilder.toString());
|
||
}
|
||
|
||
@Override
|
||
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
String string;
|
||
Object object3;
|
||
Object object2;
|
||
if (this.a == false && StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
field.addJavaDocLine("/**");
|
||
object2 = new StringBuilder();
|
||
((StringBuilder)object2).append(" * ");
|
||
((StringBuilder)object2).append(introspectedColumn.getRemarks());
|
||
field.addJavaDocLine(((StringBuilder)object2).toString());
|
||
field.addJavaDocLine(" */");
|
||
}
|
||
if (field.isTransient()) {
|
||
field.addAnnotation("@Transient");
|
||
}
|
||
for (Object object3 : introspectedTable.getPrimaryKeyColumns()) {
|
||
if (introspectedColumn != object3) continue;
|
||
if (introspectedColumn.isIdentity()) {
|
||
if (introspectedTable.getTableConfiguration().getGeneratedKey().getRuntimeSqlStatement().equals("JDBC")) {
|
||
field.addAnnotation("@TableId(value = \"" + introspectedColumn.getActualColumnName() + "\", type = IdType." + this.d + ")");
|
||
} else {
|
||
field.addAnnotation("@TableId(value = \"" + introspectedColumn.getActualColumnName() + "\", type = IdType." + this.d + ")");
|
||
}
|
||
} else if (introspectedColumn.isSequenceColumn()) {
|
||
field.addAnnotation("@TableId(value = \"" + introspectedColumn.getActualColumnName() + "\", type = IdType." + this.d + ")");
|
||
} else {
|
||
field.addAnnotation("@TableId(value = \"" + introspectedColumn.getActualColumnName() + "\", type = IdType." + this.d + ")");
|
||
}
|
||
return;
|
||
}
|
||
object2 = introspectedColumn.getActualColumnName();
|
||
if (StringUtility.stringContainsSpace((String)object2) || introspectedTable.getTableConfiguration().isAllColumnDelimitingEnabled() || m.a((String)object2)) {
|
||
object2 = this.var_java_lang_String_b + (String)object2 + this.var_java_lang_String_c;
|
||
}
|
||
object3 = "";
|
||
StringBuilder stringBuilder = new StringBuilder("@TableField(value = \"" + (String)object2 + "\"");
|
||
boolean bl = false;
|
||
if (introspectedColumn.getTypeHandler() != null) {
|
||
stringBuilder.append(",typeHandler = ").append(introspectedColumn.getTypeHandler()).append(".class");
|
||
bl = true;
|
||
}
|
||
if (this.var_boolean_c) {
|
||
string = introspectedColumn.getJavaProperty();
|
||
if (string.equalsIgnoreCase("createtime") || string.equalsIgnoreCase("createdtime")) {
|
||
stringBuilder.append(",fill = FieldFill.INSERT");
|
||
} else if (string.equalsIgnoreCase("updatetime") || string.equalsIgnoreCase("updatedtime")) {
|
||
stringBuilder.append(",fill = FieldFill.INSERT_UPDATE");
|
||
}
|
||
}
|
||
stringBuilder.append(")");
|
||
string = stringBuilder.toString();
|
||
if (bl) {
|
||
field.addAnnotation(string);
|
||
} else if (!((String)object2).equals(introspectedColumn.getJavaProperty())) {
|
||
field.addAnnotation(string);
|
||
} else if (StringUtility.stringHasValue((String)this.var_java_lang_String_b) || StringUtility.stringHasValue((String)this.var_java_lang_String_c)) {
|
||
field.addAnnotation(string);
|
||
} else if (this.var_boolean_b) {
|
||
field.addAnnotation(string);
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
method.addJavaDocLine("/**");
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" * <20><>ȡ");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" *");
|
||
}
|
||
stringBuilder.setLength(0);
|
||
stringBuilder.append(" * @return ");
|
||
stringBuilder.append(introspectedColumn.getActualColumnName());
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" - ");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
}
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" */");
|
||
}
|
||
|
||
@Override
|
||
public void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
method.addJavaDocLine("/**");
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" * <20><><C9><E8>");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" *");
|
||
}
|
||
Parameter parameter = (Parameter)method.getParameters().get(0);
|
||
stringBuilder.setLength(0);
|
||
stringBuilder.append(" * @param ");
|
||
stringBuilder.append(parameter.getName());
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" ");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
}
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" */");
|
||
}
|
||
|
||
@Override
|
||
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean bl) {
|
||
}
|
||
|
||
@Override
|
||
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addClassAnnotation(InnerClass innerClass, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* javax.xml.bind.DatatypeConverter
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.MyBatisGenerator
|
||
* org.mybatis.generator.api.dom.java.CompilationUnit
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.InnerClass
|
||
* org.mybatis.generator.api.dom.java.InnerEnum
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaElement
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.internal.DefaultCommentGenerator
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.u;
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.Calendar;
|
||
import java.util.Date;
|
||
import java.util.Map;
|
||
import java.util.Properties;
|
||
import java.util.Set;
|
||
import javax.xml.bind.DatatypeConverter;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.MyBatisGenerator;
|
||
import org.mybatis.generator.api.dom.java.CompilationUnit;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.InnerClass;
|
||
import org.mybatis.generator.api.dom.java.InnerEnum;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaElement;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.internal.DefaultCommentGenerator;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class MyCommentGenerator
|
||
extends DefaultCommentGenerator {
|
||
private Properties var_java_util_Properties_a = new Properties();
|
||
private boolean b = false;
|
||
public boolean var_boolean_a = false;
|
||
private boolean c = false;
|
||
private SimpleDateFormat var_java_text_SimpleDateFormat_a;
|
||
|
||
public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
if (!this.var_boolean_a && introspectedColumn.getRemarks() != null) {
|
||
field.addJavaDocLine("/**\n * " + introspectedColumn.getRemarks() + "\n */");
|
||
}
|
||
}
|
||
|
||
public void addJavaFileComment(CompilationUnit compilationUnit) {
|
||
if (compilationUnit instanceof TopLevelClass) {
|
||
TopLevelClass topLevelClass = (TopLevelClass)compilationUnit;
|
||
String string = u.b(topLevelClass.getType().getShortNameWithoutTypeArguments(), topLevelClass.getType().getPackageName());
|
||
if (string == null) {
|
||
return;
|
||
}
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
TopLevelClass topLevelClass2 = (TopLevelClass)compilationUnit;
|
||
topLevelClass2.addJavaDocLine(string);
|
||
}
|
||
} else if (compilationUnit instanceof Interface) {
|
||
String string = u.b(compilationUnit.getType().getShortNameWithoutTypeArguments(), compilationUnit.getType().getPackageName());
|
||
if (string == null) {
|
||
return;
|
||
}
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
Interface interface_ = (Interface)compilationUnit;
|
||
interface_.addJavaDocLine(string);
|
||
}
|
||
}
|
||
}
|
||
|
||
public void addComment(XmlElement xmlElement) {
|
||
if (!this.var_boolean_a) {
|
||
super.addComment(xmlElement);
|
||
}
|
||
}
|
||
|
||
public void addRootComment(XmlElement xmlElement) {
|
||
}
|
||
|
||
public void addConfigurationProperties(Properties properties) {
|
||
this.var_java_util_Properties_a.putAll((Map<?, ?>)properties);
|
||
this.b = StringUtility.isTrue((String)properties.getProperty("suppressDate"));
|
||
this.var_boolean_a = StringUtility.isTrue((String)properties.getProperty("suppressAllComments"));
|
||
this.c = StringUtility.isTrue((String)properties.getProperty("addRemarkComments"));
|
||
String string = properties.getProperty("dateFormat");
|
||
if (StringUtility.stringHasValue((String)string)) {
|
||
this.var_java_text_SimpleDateFormat_a = new SimpleDateFormat(string);
|
||
}
|
||
}
|
||
|
||
protected void addJavadocTag(JavaElement javaElement, boolean bl) {
|
||
}
|
||
|
||
protected String getDateString() {
|
||
if (this.b) {
|
||
return null;
|
||
}
|
||
return this.var_java_text_SimpleDateFormat_a != null ? this.var_java_text_SimpleDateFormat_a.format(new Date()) : new Date().toString();
|
||
}
|
||
|
||
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean bl) {
|
||
}
|
||
|
||
public void addModelClassComment(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
String string = introspectedTable.getRemarks();
|
||
if (StringUtils.isNotBlank((String)string) && !topLevelClass.isJavaInterface()) {
|
||
topLevelClass.addJavaDocLine("/**\n * " + string + "\n */");
|
||
}
|
||
}
|
||
|
||
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
}
|
||
|
||
public void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
}
|
||
|
||
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
set.add(new FullyQualifiedJavaType("javax.annotation.Generated"));
|
||
String string = "Source Table: " + introspectedTable.getFullyQualifiedTable().toString();
|
||
method.addAnnotation(this.a(string));
|
||
}
|
||
|
||
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> set) {
|
||
set.add(new FullyQualifiedJavaType("javax.annotation.Generated"));
|
||
String string = "Source field: " + introspectedTable.getFullyQualifiedTable().toString() + "." + introspectedColumn.getActualColumnName();
|
||
method.addAnnotation(this.a(string));
|
||
}
|
||
|
||
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
set.add(new FullyQualifiedJavaType("javax.annotation.Generated"));
|
||
String string = "Source Table: " + introspectedTable.getFullyQualifiedTable().toString();
|
||
field.addAnnotation(this.a(string));
|
||
}
|
||
|
||
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> set) {
|
||
set.add(new FullyQualifiedJavaType("javax.annotation.Generated"));
|
||
String string = "Source field: " + introspectedTable.getFullyQualifiedTable().toString() + "." + introspectedColumn.getActualColumnName();
|
||
field.addAnnotation(this.a(string));
|
||
}
|
||
|
||
public void addClassAnnotation(InnerClass innerClass, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
set.add(new FullyQualifiedJavaType("javax.annotation.Generated"));
|
||
String string = "Source Table: " + introspectedTable.getFullyQualifiedTable().toString();
|
||
innerClass.addAnnotation(this.a(string));
|
||
}
|
||
|
||
private String a(String string) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append("@Generated(");
|
||
if (this.var_boolean_a) {
|
||
stringBuilder.append('\"');
|
||
} else {
|
||
stringBuilder.append("value=\"");
|
||
}
|
||
stringBuilder.append(MyBatisGenerator.class.getName());
|
||
stringBuilder.append('\"');
|
||
if (!this.b && !this.var_boolean_a) {
|
||
stringBuilder.append(", date=\"");
|
||
stringBuilder.append(DatatypeConverter.printDateTime((Calendar)Calendar.getInstance()));
|
||
stringBuilder.append('\"');
|
||
}
|
||
if (!this.var_boolean_a) {
|
||
stringBuilder.append(", comments=\"");
|
||
stringBuilder.append(string);
|
||
stringBuilder.append('\"');
|
||
}
|
||
stringBuilder.append(')');
|
||
return stringBuilder.toString();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.config.Context
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
* tk.mybatis.mapper.generator.FalseMethodPlugin
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.m;
|
||
import java.util.HashSet;
|
||
import java.util.Properties;
|
||
import java.util.Set;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.config.Context;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
import tk.mybatis.mapper.generator.FalseMethodPlugin;
|
||
|
||
public class MyCommonMapperPlugin
|
||
extends FalseMethodPlugin {
|
||
private Set<String> var_java_util_Set_java_lang_String__a = new HashSet<String>();
|
||
private boolean var_boolean_a = false;
|
||
private boolean var_boolean_b = true;
|
||
private String var_java_lang_String_a = "";
|
||
private String var_java_lang_String_b = "";
|
||
private String var_java_lang_String_c;
|
||
private boolean var_boolean_c;
|
||
private boolean d = false;
|
||
private boolean e = false;
|
||
|
||
public String a(String string) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (StringUtility.stringHasValue((String)this.var_java_lang_String_c)) {
|
||
stringBuilder.append(this.var_java_lang_String_c);
|
||
stringBuilder.append(".");
|
||
}
|
||
if (m.a(string)) {
|
||
stringBuilder.append(this.var_java_lang_String_a);
|
||
stringBuilder.append(string);
|
||
stringBuilder.append(this.var_java_lang_String_b);
|
||
return stringBuilder.toString();
|
||
}
|
||
return stringBuilder.append(string).toString();
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
|
||
for (String string : this.var_java_util_Set_java_lang_String__a) {
|
||
if (!this.e || !string.endsWith(".Mapper")) {
|
||
interface_.addImportedType(new FullyQualifiedJavaType(string));
|
||
}
|
||
interface_.addSuperInterface(new FullyQualifiedJavaType(string + "<" + fullyQualifiedJavaType.getShortName() + ">"));
|
||
}
|
||
interface_.addImportedType(fullyQualifiedJavaType);
|
||
return true;
|
||
}
|
||
|
||
private void a(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
Object object;
|
||
topLevelClass.addImportedType("javax.persistence.*");
|
||
String string = introspectedTable.getContext().getProperty("sequenceId");
|
||
if (StringUtils.isNotBlank((CharSequence)string)) {
|
||
topLevelClass.addImportedType("tk.mybatis.mapper.annotation.KeySql");
|
||
topLevelClass.addImportedType("tk.mybatis.mapper.code.ORDER");
|
||
}
|
||
if (StringUtility.stringContainsSpace((String)(object = introspectedTable.getFullyQualifiedTableNameAtRuntime()))) {
|
||
object = this.context.getBeginningDelimiter() + (String)object + this.context.getEndingDelimiter();
|
||
}
|
||
if (this.var_boolean_a && !topLevelClass.getType().getShortName().equals(object)) {
|
||
topLevelClass.addAnnotation("@Table(name = \"" + this.a((String)object) + "\")");
|
||
} else if (!topLevelClass.getType().getShortName().equalsIgnoreCase((String)object)) {
|
||
topLevelClass.addAnnotation("@Table(name = \"" + this.a((String)object) + "\")");
|
||
} else if (StringUtility.stringHasValue((String)this.var_java_lang_String_c) || StringUtility.stringHasValue((String)this.var_java_lang_String_a) || StringUtility.stringHasValue((String)this.var_java_lang_String_b)) {
|
||
topLevelClass.addAnnotation("@Table(name = \"" + this.a((String)object) + "\")");
|
||
} else if (this.var_boolean_c) {
|
||
topLevelClass.addAnnotation("@Table(name = \"" + this.a((String)object) + "\")");
|
||
}
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return true;
|
||
}
|
||
|
||
public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return true;
|
||
}
|
||
|
||
public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return false;
|
||
}
|
||
|
||
public void setContext(Context context) {
|
||
super.setContext(context);
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string;
|
||
String string2;
|
||
String string3;
|
||
String string4;
|
||
String string5;
|
||
String string62;
|
||
super.setProperties(properties);
|
||
String string7 = this.properties.getProperty("mappers");
|
||
if (StringUtility.stringHasValue((String)string7)) {
|
||
for (String string62 : string7.split(",")) {
|
||
this.var_java_util_Set_java_lang_String__a.add(string62);
|
||
}
|
||
} else {
|
||
throw new RuntimeException("Mapper<65><72><B2><E5>ȱ<FE>ٱ<C9>Ҫ<D8><D2AA>mappers<72><73><CA><F4>!");
|
||
}
|
||
String string8 = this.properties.getProperty("caseSensitive");
|
||
if (StringUtility.stringHasValue((String)string8)) {
|
||
this.var_boolean_a = string8.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string5 = this.properties.getProperty("forceAnnotation")))) {
|
||
if (this.var_boolean_b) {
|
||
this.context.getCommentGeneratorConfiguration().addProperty("forceAnnotation", string5);
|
||
}
|
||
this.var_boolean_c = string5.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string4 = this.properties.getProperty("beginningDelimiter")))) {
|
||
this.var_java_lang_String_a = string4;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string62 = this.properties.getProperty("endingDelimiter")))) {
|
||
this.var_java_lang_String_b = string62;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string3 = this.properties.getProperty("schema")))) {
|
||
this.var_java_lang_String_c = string3;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string2 = this.properties.getProperty("useIntellijDatabase")))) {
|
||
this.d = string2.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = this.properties.getProperty("hasMapperAnnotation")))) {
|
||
this.e = string.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (!this.d) {
|
||
this.context.getJdbcConnectionConfiguration().addProperty("remarksReporting", "true");
|
||
}
|
||
if (this.var_boolean_b) {
|
||
this.context.getCommentGeneratorConfiguration().addProperty("beginningDelimiter", this.var_java_lang_String_a);
|
||
this.context.getCommentGeneratorConfiguration().addProperty("endingDelimiter", this.var_java_lang_String_b);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.config.Context
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
* tk.mybatis.mapper.generator.FalseMethodPlugin
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.PluginUtils;
|
||
import java.util.HashSet;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import java.util.Set;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.config.Context;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
import tk.mybatis.mapper.generator.FalseMethodPlugin;
|
||
|
||
public class MyMybatisPlusPlugin
|
||
extends FalseMethodPlugin {
|
||
public static final String var_java_lang_String_a = "useMybatisPlus3";
|
||
public static final String var_java_lang_String_b = "FIELD_FILL";
|
||
public static final String var_java_lang_String_c = "MybatisPlusStaticField";
|
||
public static final String var_java_lang_String_d = "generateUpdateSelectiveAndInsertSelective";
|
||
public static final String var_java_lang_String_e = "mybatisPlusGenerateByPrimaryKey";
|
||
private Set<String> var_java_util_Set_java_lang_String__a;
|
||
private boolean var_boolean_a;
|
||
private boolean var_boolean_b;
|
||
private boolean var_boolean_c;
|
||
private boolean var_boolean_d;
|
||
private String g;
|
||
private String h;
|
||
private String i;
|
||
private String j;
|
||
private boolean var_boolean_e;
|
||
private boolean var_boolean_f;
|
||
@Nullable
|
||
public static final String var_java_lang_String_f = "sequenceId";
|
||
|
||
public MyMybatisPlusPlugin() {
|
||
this.var_java_lang_String_a = new HashSet();
|
||
this.var_boolean_a = false;
|
||
this.var_boolean_b = true;
|
||
this.var_boolean_c = false;
|
||
this.var_boolean_d = false;
|
||
this.g = "";
|
||
this.h = "";
|
||
this.var_boolean_f = false;
|
||
}
|
||
|
||
public String a(String string) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (StringUtility.stringHasValue((String)this.j)) {
|
||
stringBuilder.append(this.j);
|
||
stringBuilder.append(".");
|
||
}
|
||
stringBuilder.append(this.g);
|
||
stringBuilder.append(string);
|
||
stringBuilder.append(this.h);
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
|
||
Iterator iterator = this.var_java_lang_String_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
interface_.addImportedType(new FullyQualifiedJavaType(string));
|
||
interface_.addSuperInterface(new FullyQualifiedJavaType(string + "<" + fullyQualifiedJavaType.getShortName() + ">"));
|
||
}
|
||
interface_.addImportedType(fullyQualifiedJavaType);
|
||
return true;
|
||
}
|
||
|
||
private void a(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
Object object3;
|
||
Object object2;
|
||
if (PluginUtils.a(var_java_lang_String_a, introspectedTable.getContext().getProperties())) {
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotation.TableName");
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotation.TableId");
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotation.TableField");
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotation.IdType");
|
||
if (StringUtils.isNotBlank((CharSequence)this.i)) {
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotation.KeySequence");
|
||
topLevelClass.addAnnotation("@KeySequence(\"" + this.i + "\")");
|
||
}
|
||
} else {
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotations.TableName");
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotations.TableId");
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotations.TableField");
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.enums.IdType");
|
||
}
|
||
if (PluginUtils.a(var_java_lang_String_b, introspectedTable.getContext().getProperties())) {
|
||
topLevelClass.addImportedType("com.baomidou.mybatisplus.annotation.FieldFill");
|
||
}
|
||
if (((String)(object2 = introspectedTable.getFullyQualifiedTableNameAtRuntime())).startsWith("\"") || ((String)object2).endsWith("\"")) {
|
||
object2 = "\\\"" + ((String)object2).substring(1, ((String)object2).length() - 1) + "\\\"";
|
||
}
|
||
boolean bl = false;
|
||
List list = introspectedTable.getAllColumns();
|
||
for (Object object3 : list) {
|
||
if (object3.getTypeHandler() == null) continue;
|
||
bl = true;
|
||
}
|
||
Object object4 = "@TableName(value = \"" + (String)object2 + "\"";
|
||
if (bl) {
|
||
object4 = (String)object4 + ", autoResultMap = true";
|
||
}
|
||
object3 = (String)object4 + ")";
|
||
if (this.var_boolean_a && !topLevelClass.getType().getShortName().equals(object2)) {
|
||
topLevelClass.addAnnotation((String)object3);
|
||
} else if (!topLevelClass.getType().getShortName().equalsIgnoreCase((String)object2)) {
|
||
topLevelClass.addAnnotation((String)object3);
|
||
} else if (StringUtility.stringHasValue((String)this.j) || StringUtility.stringHasValue((String)this.g) || StringUtility.stringHasValue((String)this.h)) {
|
||
topLevelClass.addAnnotation((String)object3);
|
||
} else if (this.var_boolean_e) {
|
||
topLevelClass.addAnnotation((String)object3);
|
||
}
|
||
if (PluginUtils.a(var_java_lang_String_c, introspectedTable.getContext().getProperties())) {
|
||
List list2 = introspectedTable.getAllColumns();
|
||
for (IntrospectedColumn introspectedColumn : list2) {
|
||
Field field = new Field("COL_" + introspectedColumn.getActualColumnName().toUpperCase(), new FullyQualifiedJavaType("java.lang.String"));
|
||
field.setStatic(true);
|
||
field.setFinal(true);
|
||
field.setInitializationString("\"" + introspectedColumn.getActualColumnName() + "\"");
|
||
field.setVisibility(JavaVisibility.PUBLIC);
|
||
topLevelClass.addField(field);
|
||
}
|
||
}
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return true;
|
||
}
|
||
|
||
public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return true;
|
||
}
|
||
|
||
public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
this.a(topLevelClass, introspectedTable);
|
||
return false;
|
||
}
|
||
|
||
public void setContext(Context context) {
|
||
super.setContext(context);
|
||
boolean bl = this.var_boolean_b = !"FALSE".equalsIgnoreCase(context.getProperty("useMapperCommentGenerator"));
|
||
if (this.var_boolean_b) {
|
||
// empty if block
|
||
}
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
String string;
|
||
String string2;
|
||
String string3;
|
||
String string4;
|
||
String string5;
|
||
String string6;
|
||
String string7;
|
||
Object object;
|
||
Object object2;
|
||
super.setProperties(properties);
|
||
String string8 = this.properties.getProperty("mappers");
|
||
if (StringUtility.stringHasValue((String)string8)) {
|
||
object2 = string8.split(",");
|
||
int n2 = ((String[])object2).length;
|
||
for (int i2 = 0; i2 < n2; ++i2) {
|
||
object = object2[i2];
|
||
this.var_java_lang_String_a.add(object);
|
||
}
|
||
}
|
||
if (StringUtility.stringHasValue((String)(object2 = this.properties.getProperty("caseSensitive")))) {
|
||
this.var_boolean_a = ((String)object2).equalsIgnoreCase("TRUE");
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string7 = this.properties.getProperty(var_java_lang_String_f)))) {
|
||
this.i = string7;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string6 = this.properties.getProperty(var_java_lang_String_d))) && StringUtility.isTrue((String)string6)) {
|
||
this.var_boolean_c = true;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(object = this.properties.getProperty(var_java_lang_String_e))) && StringUtility.isTrue((String)object)) {
|
||
this.var_boolean_d = true;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string5 = this.properties.getProperty("forceAnnotation")))) {
|
||
if (this.var_boolean_b) {
|
||
this.context.getCommentGeneratorConfiguration().addProperty("forceAnnotation", string5);
|
||
}
|
||
this.var_boolean_e = string5.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string4 = this.properties.getProperty("beginningDelimiter")))) {
|
||
this.g = string4;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string3 = this.properties.getProperty("endingDelimiter")))) {
|
||
this.h = string3;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string2 = this.properties.getProperty("schema")))) {
|
||
this.j = string2;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = this.properties.getProperty("useIntellijDatabase")))) {
|
||
this.var_boolean_f = string.equalsIgnoreCase("TRUE");
|
||
}
|
||
if (!this.var_boolean_f) {
|
||
this.context.getJdbcConnectionConfiguration().addProperty("remarksReporting", "true");
|
||
}
|
||
if (this.var_boolean_b) {
|
||
this.context.getCommentGeneratorConfiguration().addProperty("beginningDelimiter", this.g);
|
||
this.context.getCommentGeneratorConfiguration().addProperty("endingDelimiter", this.h);
|
||
}
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean clientInsertSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean clientInsertSelectiveMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean sqlMapInsertSelectiveElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_c;
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_d;
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_d;
|
||
}
|
||
|
||
public boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_d;
|
||
}
|
||
|
||
public boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
return this.var_boolean_d;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.java.CompilationUnit
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.InnerClass
|
||
* org.mybatis.generator.api.dom.java.InnerEnum
|
||
* org.mybatis.generator.api.dom.java.JavaElement
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.m;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.MyCommentGenerator;
|
||
import java.text.MessageFormat;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import java.util.Set;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.java.CompilationUnit;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.InnerClass;
|
||
import org.mybatis.generator.api.dom.java.InnerEnum;
|
||
import org.mybatis.generator.api.dom.java.JavaElement;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class MyTkMapperCommentGenerator
|
||
extends MyCommentGenerator {
|
||
private String a = "";
|
||
private String var_java_lang_String_b = "";
|
||
private boolean var_boolean_b;
|
||
|
||
@Override
|
||
public void addJavaFileComment(CompilationUnit compilationUnit) {
|
||
super.addJavaFileComment(compilationUnit);
|
||
}
|
||
|
||
@Override
|
||
public void addComment(XmlElement xmlElement) {
|
||
super.addComment(xmlElement);
|
||
}
|
||
|
||
@Override
|
||
public void addRootComment(XmlElement xmlElement) {
|
||
}
|
||
|
||
@Override
|
||
public void addConfigurationProperties(Properties properties) {
|
||
String string;
|
||
String string2;
|
||
String string3 = properties.getProperty("beginningDelimiter");
|
||
if (StringUtility.stringHasValue((String)string3)) {
|
||
this.a = string3;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string2 = properties.getProperty("endingDelimiter")))) {
|
||
this.var_java_lang_String_b = string2;
|
||
}
|
||
if (StringUtility.stringHasValue((String)(string = properties.getProperty("forceAnnotation")))) {
|
||
this.var_boolean_b = string.equalsIgnoreCase("TRUE");
|
||
}
|
||
}
|
||
|
||
public String a(String object, IntrospectedTable introspectedTable) {
|
||
if (StringUtility.stringContainsSpace((String)object) || introspectedTable.getTableConfiguration().isAllColumnDelimitingEnabled()) {
|
||
object = this.a + (String)object + this.var_java_lang_String_b;
|
||
return object;
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
if (m.a((String)object)) {
|
||
stringBuilder.append(this.a);
|
||
stringBuilder.append((String)object);
|
||
stringBuilder.append(this.var_java_lang_String_b);
|
||
return stringBuilder.toString();
|
||
}
|
||
return stringBuilder.append((String)object).toString();
|
||
}
|
||
|
||
@Override
|
||
protected void addJavadocTag(JavaElement javaElement, boolean bl) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(" * ");
|
||
stringBuilder.append("@mbg.generated");
|
||
if (bl) {
|
||
stringBuilder.append(" do_not_delete_during_merge");
|
||
}
|
||
javaElement.addJavaDocLine(stringBuilder.toString());
|
||
}
|
||
|
||
@Override
|
||
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
CharSequence charSequence;
|
||
Object object;
|
||
Object object2;
|
||
CharSequence charSequence2;
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
field.addJavaDocLine("/**");
|
||
charSequence2 = new StringBuilder();
|
||
((StringBuilder)charSequence2).append(" * ");
|
||
((StringBuilder)charSequence2).append(introspectedColumn.getRemarks());
|
||
field.addJavaDocLine(((StringBuilder)charSequence2).toString());
|
||
field.addJavaDocLine(" */");
|
||
}
|
||
if (field.isTransient()) {
|
||
field.addAnnotation("@Transient");
|
||
}
|
||
charSequence2 = introspectedTable.getContext().getProperty("sequenceId");
|
||
boolean bl = false;
|
||
List list = introspectedTable.getPrimaryKeyColumns();
|
||
if (list.size() == 1) {
|
||
object2 = list.iterator();
|
||
while (object2.hasNext()) {
|
||
object = (IntrospectedColumn)object2.next();
|
||
if (introspectedColumn != object) continue;
|
||
field.addAnnotation("@Id");
|
||
if (!StringUtils.isNotBlank((CharSequence)charSequence2)) break;
|
||
charSequence = charSequence2;
|
||
field.addAnnotation("@KeySql(sql =\"select " + (String)charSequence + ".nextval from dual\",order=ORDER.BEFORE)");
|
||
bl = true;
|
||
break;
|
||
}
|
||
}
|
||
if (!((String)(object2 = introspectedColumn.getActualColumnName())).equals(introspectedColumn.getJavaProperty())) {
|
||
field.addAnnotation("@Column(name = \"" + this.a((String)object2, introspectedTable) + "\")");
|
||
} else if (StringUtility.stringHasValue((String)this.a) || StringUtility.stringHasValue((String)this.var_java_lang_String_b)) {
|
||
field.addAnnotation("@Column(name = \"" + this.a((String)object2, introspectedTable) + "\")");
|
||
} else if (this.var_boolean_b) {
|
||
field.addAnnotation("@Column(name = \"" + this.a((String)object2, introspectedTable) + "\")");
|
||
}
|
||
if (introspectedColumn.isIdentity()) {
|
||
if (introspectedTable.getTableConfiguration().getGeneratedKey().getRuntimeSqlStatement().equals("JDBC")) {
|
||
field.addAnnotation("@GeneratedValue(generator = \"JDBC\")");
|
||
} else {
|
||
field.addAnnotation("@GeneratedValue(strategy = GenerationType.IDENTITY)");
|
||
}
|
||
} else if (introspectedColumn.isSequenceColumn() && !bl) {
|
||
object = introspectedTable.getFullyQualifiedTableNameAtRuntime();
|
||
charSequence = MessageFormat.format(introspectedTable.getTableConfiguration().getGeneratedKey().getRuntimeSqlStatement(), object, ((String)object).toUpperCase());
|
||
field.addAnnotation("@GeneratedValue(strategy = GenerationType.IDENTITY, generator = \"" + (String)charSequence + "\")");
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
|
||
}
|
||
|
||
@Override
|
||
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
method.addJavaDocLine("/**");
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" * <20><>ȡ");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" *");
|
||
}
|
||
stringBuilder.setLength(0);
|
||
stringBuilder.append(" * @return ");
|
||
stringBuilder.append(introspectedColumn.getActualColumnName());
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" - ");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
}
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" */");
|
||
}
|
||
|
||
@Override
|
||
public void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
method.addJavaDocLine("/**");
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" * <20><><C9><E8>");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" *");
|
||
}
|
||
Parameter parameter = (Parameter)method.getParameters().get(0);
|
||
stringBuilder.setLength(0);
|
||
stringBuilder.append(" * @param ");
|
||
stringBuilder.append(parameter.getName());
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getRemarks())) {
|
||
stringBuilder.append(" ");
|
||
stringBuilder.append(introspectedColumn.getRemarks());
|
||
}
|
||
method.addJavaDocLine(stringBuilder.toString());
|
||
method.addJavaDocLine(" */");
|
||
}
|
||
|
||
@Override
|
||
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean bl) {
|
||
}
|
||
|
||
@Override
|
||
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
|
||
@Override
|
||
public void addClassAnnotation(InnerClass innerClass, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> set) {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.StringUtils;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import java.util.regex.Matcher;
|
||
import java.util.regex.Pattern;
|
||
|
||
public class NameUtils {
|
||
private static volatile NameUtils var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a;
|
||
private static Map<String, String> var_java_util_Map_java_lang_String,_java_lang_String__a;
|
||
private static final Pattern var_java_util_regex_Pattern_a;
|
||
private static final Pattern b;
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
* Enabled force condition propagation
|
||
* Lifted jumps to return sites
|
||
*/
|
||
public static NameUtils com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a() {
|
||
if (var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a != null) return var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a;
|
||
Class<NameUtils> clazz = NameUtils.class;
|
||
synchronized (NameUtils.class) {
|
||
if (var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a != null) return var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a;
|
||
var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a = new NameUtils();
|
||
// ** MonitorExit[var0] (shouldn't be in output)
|
||
return var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a;
|
||
}
|
||
}
|
||
|
||
NameUtils() {
|
||
}
|
||
|
||
public String b(String string) {
|
||
return StringUtils.a(string);
|
||
}
|
||
|
||
public String c(String string) {
|
||
return StringUtils.b(string);
|
||
}
|
||
|
||
public String d(String string) {
|
||
if (StringUtils.a((CharSequence)string)) {
|
||
return string;
|
||
}
|
||
Matcher matcher = b.matcher(string);
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
while (matcher.find()) {
|
||
if (matcher.start() > 0) {
|
||
matcher.appendReplacement(stringBuffer, "_" + matcher.group(0).toLowerCase());
|
||
continue;
|
||
}
|
||
matcher.appendReplacement(stringBuffer, matcher.group(0).toLowerCase());
|
||
}
|
||
matcher.appendTail(stringBuffer);
|
||
return stringBuffer.toString();
|
||
}
|
||
|
||
public String e(String string) {
|
||
int n2 = string.indexOf(60);
|
||
if (n2 == -1) {
|
||
return string.substring(string.lastIndexOf(46) + 1);
|
||
}
|
||
String string2 = string.substring(0, n2);
|
||
return string.substring(string2.lastIndexOf(46) + 1);
|
||
}
|
||
|
||
public String f(String string) {
|
||
int n2 = string.indexOf(60);
|
||
if (n2 == -1) {
|
||
return string;
|
||
}
|
||
return string.substring(0, n2);
|
||
}
|
||
|
||
public String g(String string) {
|
||
String string2 = string;
|
||
if (var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a.containsKey(string)) {
|
||
string2 = (String)var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a.get(string);
|
||
}
|
||
return this.e(string2);
|
||
}
|
||
|
||
public String h(String string) {
|
||
if (StringUtils.a((CharSequence)string)) {
|
||
return string;
|
||
}
|
||
string = string.toLowerCase();
|
||
Matcher matcher = var_java_util_regex_Pattern_a.matcher(string.toLowerCase());
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
while (matcher.find()) {
|
||
matcher.appendReplacement(stringBuffer, matcher.group(1).toUpperCase());
|
||
}
|
||
matcher.appendTail(stringBuffer);
|
||
return stringBuffer.toString();
|
||
}
|
||
|
||
public String i(String string) {
|
||
return this.b(this.h(string));
|
||
}
|
||
|
||
public String java_lang_String_a(Object ... objectArray) {
|
||
if (objectArray == null || objectArray.length == 0) {
|
||
return null;
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (Object object : objectArray) {
|
||
if (object == null) continue;
|
||
stringBuilder.append(object);
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_mybatisGenerator_plugins_NameUtils_a = new HashMap<String, String>(){
|
||
{
|
||
this.put("java.lang.Byte", "kotlin.Byte");
|
||
this.put("java.lang.Short", "kotlin.Short");
|
||
this.put("java.lang.Integer", "kotlin.Int");
|
||
this.put("java.lang.Long", "kotlin.Long");
|
||
this.put("java.lang.Character", "kotlin.Char");
|
||
this.put("java.lang.Float", "kotlin.Float");
|
||
this.put("java.lang.Double", "kotlin.Double");
|
||
this.put("java.lang.Boolean", "kotlin.Boolean");
|
||
this.put("byte", "kotlin.Byte");
|
||
this.put("short", "kotlin.Short");
|
||
this.put("int", "kotlin.Int");
|
||
this.put("long", "kotlin.Long");
|
||
this.put("char", "kotlin.Char");
|
||
this.put("float", "kotlin.Float");
|
||
this.put("double", "kotlin.Double");
|
||
this.put("boolean", "kotlin.Boolean");
|
||
}
|
||
};
|
||
var_java_util_regex_Pattern_a = Pattern.compile("[-_]([a-z0-9])");
|
||
b = Pattern.compile("[A-Z]+");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d.c;
|
||
import java.util.List;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
|
||
public class NotNullMaxLengthPlugin
|
||
extends PluginAdapter {
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
boolean bl = false;
|
||
boolean bl2 = false;
|
||
boolean bl3 = false;
|
||
List list = topLevelClass.getFields();
|
||
List list2 = introspectedTable.getAllColumns();
|
||
for (Field field : list) {
|
||
for (IntrospectedColumn introspectedColumn : list2) {
|
||
String string;
|
||
Object object;
|
||
boolean bl4 = introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName().equals("java.lang.String");
|
||
if (!field.getName().equals(introspectedColumn.getJavaProperty())) continue;
|
||
if (!introspectedColumn.isNullable() && !bl4) {
|
||
Object object2 = "";
|
||
object = introspectedColumn.getRemarks();
|
||
object2 = StringUtils.isNotBlank((String)object) ? (String)object + A.a("notNull") : A.a("notNull");
|
||
field.addAnnotation("@NotNull(message = \"" + (String)object2 + "\")");
|
||
bl = true;
|
||
}
|
||
if (!bl4) continue;
|
||
int n2 = introspectedColumn.getLength();
|
||
if (n2 > 0) {
|
||
object = "";
|
||
string = introspectedColumn.getRemarks();
|
||
object = StringUtils.isNotBlank((String)string) ? string + A.a("maxSize") + " " + n2 : A.a("maxSize") + " " + n2;
|
||
field.addAnnotation("@Size(max = " + n2 + ",message = \"" + (String)object + "\")");
|
||
bl2 = true;
|
||
}
|
||
if (introspectedColumn.isNullable()) continue;
|
||
object = "";
|
||
string = introspectedColumn.getRemarks();
|
||
object = StringUtils.isNotBlank((String)string) ? string + A.a("notBlank") : A.a("notBlank");
|
||
field.addAnnotation("@NotBlank(message = \"" + (String)object + "\")");
|
||
bl3 = true;
|
||
}
|
||
}
|
||
String string = introspectedTable.getContext().getProperty(c.a);
|
||
boolean bl5 = false;
|
||
if (StringUtils.isNotBlank((String)string) && string.equals("true")) {
|
||
bl5 = true;
|
||
}
|
||
if (bl) {
|
||
if (bl5) {
|
||
topLevelClass.addImportedType("jakarta.validation.constraints.NotNull");
|
||
} else {
|
||
topLevelClass.addImportedType("javax.validation.constraints.NotNull");
|
||
}
|
||
}
|
||
if (bl2) {
|
||
if (bl5) {
|
||
topLevelClass.addImportedType("jakarta.validation.constraints.Size");
|
||
} else {
|
||
topLevelClass.addImportedType("javax.validation.constraints.Size");
|
||
}
|
||
}
|
||
if (bl3) {
|
||
if (bl5) {
|
||
topLevelClass.addImportedType("jakarta.validation.constraints.NotBlank");
|
||
} else {
|
||
topLevelClass.addImportedType("javax.validation.constraints.NotBlank");
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
|
||
public class OnlyPreviewXmlPlugin
|
||
extends PluginAdapter {
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
|
||
public class P3CCommentPlugin
|
||
extends PluginAdapter {
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientInsertMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
method.addJavaDocLine("/**\n * insert record to table\n * @param record the record\n * @return insert count\n */");
|
||
return super.clientInsertMethodGenerated(method, interface_, introspectedTable);
|
||
}
|
||
|
||
public boolean clientInsertSelectiveMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
method.addJavaDocLine("/**\n * insert record to table selective\n * @param record the record\n * @return insert count\n */");
|
||
return super.clientInsertSelectiveMethodGenerated(method, interface_, introspectedTable);
|
||
}
|
||
|
||
public boolean clientSelectByPrimaryKeyMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
String string = ((Parameter)method.getParameters().get(0)).getName();
|
||
method.addJavaDocLine("/**\n * select by primary key\n * @param " + string + " primary key\n * @return object by primary key\n */");
|
||
return super.clientSelectByPrimaryKeyMethodGenerated(method, interface_, introspectedTable);
|
||
}
|
||
|
||
public boolean clientDeleteByPrimaryKeyMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
String string = ((Parameter)method.getParameters().get(0)).getName();
|
||
method.addJavaDocLine("/**\n * delete by primary key\n * @param " + string + " primaryKey\n * @return deleteCount\n */");
|
||
return super.clientDeleteByPrimaryKeyMethodGenerated(method, interface_, introspectedTable);
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
method.addJavaDocLine("/**\n * update record\n * @param record the updated record\n * @return update count\n */");
|
||
return super.clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, interface_, introspectedTable);
|
||
}
|
||
|
||
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interface_, IntrospectedTable introspectedTable) {
|
||
method.addJavaDocLine("/**\n * update record selective\n * @param record the updated record\n * @return update count\n */");
|
||
return super.clientUpdateByPrimaryKeySelectiveMethodGenerated(method, interface_, introspectedTable);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import java.util.function.BiFunction;
|
||
import java.util.function.Function;
|
||
|
||
public class StringUtils {
|
||
private static final BiFunction<String, Function<Integer, Integer>, String> a = (string, function) -> {
|
||
int n2;
|
||
int n3;
|
||
int n4;
|
||
if (string == null || (n4 = string.length()) == 0) {
|
||
return string;
|
||
}
|
||
int n5 = string.codePointAt(0);
|
||
if (n5 == (n3 = ((Integer)function.apply(n5)).intValue())) {
|
||
return string;
|
||
}
|
||
int[] nArray = new int[n4];
|
||
int n6 = 0;
|
||
nArray[n6++] = n3;
|
||
for (int i2 = Character.charCount(n5); i2 < n4; i2 += Character.charCount(n2)) {
|
||
n2 = string.codePointAt(i2);
|
||
nArray[n6++] = n2;
|
||
}
|
||
return new String(nArray, 0, n6);
|
||
};
|
||
|
||
public static boolean a(CharSequence charSequence) {
|
||
return charSequence == null || charSequence.length() == 0;
|
||
}
|
||
|
||
public static String a(String string) {
|
||
return a.apply(string, Character::toTitleCase);
|
||
}
|
||
|
||
public static String b(String string) {
|
||
return a.apply(string, Character::toLowerCase);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.CommentGenerator
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.InnerClass
|
||
* org.mybatis.generator.api.dom.java.InnerEnum
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.tools;
|
||
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import java.util.TreeSet;
|
||
import org.mybatis.generator.api.CommentGenerator;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.InnerClass;
|
||
import org.mybatis.generator.api.dom.java.InnerEnum;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
|
||
public class FormatTools {
|
||
public static void a(InnerClass innerClass, Method method) {
|
||
FormatTools.a(method, innerClass.getMethods());
|
||
}
|
||
|
||
public static void a(Interface interface_, Method method) {
|
||
TreeSet<FullyQualifiedJavaType> treeSet = new TreeSet<FullyQualifiedJavaType>();
|
||
if (method.getReturnType() != null) {
|
||
treeSet.add(method.getReturnType());
|
||
treeSet.addAll(method.getReturnType().getTypeArguments());
|
||
}
|
||
for (Parameter parameter : method.getParameters()) {
|
||
boolean bl = true;
|
||
for (String string : parameter.getAnnotations()) {
|
||
if (!string.startsWith("@Param")) continue;
|
||
treeSet.add(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Param"));
|
||
}
|
||
if (!bl) continue;
|
||
treeSet.add(parameter.getType());
|
||
treeSet.addAll(parameter.getType().getTypeArguments());
|
||
}
|
||
interface_.addImportedTypes(treeSet);
|
||
FormatTools.a(method, interface_.getMethods());
|
||
}
|
||
|
||
public static void a(InnerEnum innerEnum, Method method) {
|
||
FormatTools.a(method, innerEnum.getMethods());
|
||
}
|
||
|
||
public static void a(TopLevelClass topLevelClass, Method method) {
|
||
FormatTools.a(method, topLevelClass.getMethods());
|
||
}
|
||
|
||
public static void a(XmlElement xmlElement, XmlElement xmlElement2) {
|
||
if (xmlElement2.getName().equals("sql")) {
|
||
int n2 = 0;
|
||
for (Element element : xmlElement.getElements()) {
|
||
if (!(element instanceof XmlElement) || !((XmlElement)element).getName().equals("sql")) continue;
|
||
++n2;
|
||
}
|
||
xmlElement.addElement(n2, (Element)xmlElement2);
|
||
} else {
|
||
String string = FormatTools.a(xmlElement2);
|
||
if (string == null) {
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
} else {
|
||
List list = xmlElement.getElements();
|
||
int n3 = -1;
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
String string2;
|
||
Element element = (Element)list.get(i2);
|
||
if (!(element instanceof XmlElement) || (string2 = FormatTools.a((XmlElement)element)) == null) continue;
|
||
if (string2.startsWith(string)) {
|
||
if (n3 != -1) continue;
|
||
n3 = i2;
|
||
continue;
|
||
}
|
||
if (!string.startsWith(string2)) continue;
|
||
n3 = i2 + 1;
|
||
}
|
||
if (n3 == -1 || n3 >= list.size()) {
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
} else {
|
||
list.add(n3, xmlElement2);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
private static String a(XmlElement xmlElement) {
|
||
for (Attribute attribute : xmlElement.getAttributes()) {
|
||
if (!attribute.getName().equals("id")) continue;
|
||
return attribute.getValue();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private static void a(Method method, List<Method> list) {
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
Method method2 = list.get(i2);
|
||
if (method2.getName().equals(method.getName())) {
|
||
if (method2.getParameters().size() <= method.getParameters().size()) {
|
||
n2 = i2 + 1;
|
||
continue;
|
||
}
|
||
n2 = i2;
|
||
continue;
|
||
}
|
||
if (method2.getName().startsWith(method.getName())) {
|
||
if (n2 != -1) continue;
|
||
n2 = i2;
|
||
continue;
|
||
}
|
||
if (!method.getName().startsWith(method2.getName())) continue;
|
||
n2 = i2 + 1;
|
||
}
|
||
if (n2 == -1 || n2 >= list.size()) {
|
||
list.add(list.size(), method);
|
||
} else {
|
||
list.add(n2, method);
|
||
}
|
||
}
|
||
|
||
public static void a(CommentGenerator commentGenerator, Method method, IntrospectedTable introspectedTable) {
|
||
method.getJavaDocLines().clear();
|
||
commentGenerator.addGeneralMethodComment(method, introspectedTable);
|
||
}
|
||
|
||
public static void a(CommentGenerator commentGenerator, XmlElement xmlElement) {
|
||
Element element;
|
||
Iterator iterator = xmlElement.getElements().iterator();
|
||
boolean bl = false;
|
||
while (iterator.hasNext()) {
|
||
element = (Element)iterator.next();
|
||
if (element instanceof TextElement && ((TextElement)element).getContent().matches("<!--")) {
|
||
bl = true;
|
||
}
|
||
if (bl) {
|
||
iterator.remove();
|
||
}
|
||
if (!(element instanceof TextElement) || !((TextElement)element).getContent().matches("-->")) continue;
|
||
bl = false;
|
||
}
|
||
element = new XmlElement("tmp");
|
||
commentGenerator.addComment((XmlElement)element);
|
||
for (int i2 = element.getElements().size() - 1; i2 >= 0; --i2) {
|
||
xmlElement.addElement(0, (Element)element.getElements().get(i2));
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.tools;
|
||
|
||
import com.ccnode.codegenerator.ad.w_0;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
|
||
public class IntrospectedTableTools {
|
||
public static IntrospectedColumn a(IntrospectedTable introspectedTable, String string) {
|
||
string = string.trim();
|
||
string = w_0.a.c(string);
|
||
return introspectedTable.getColumn(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.java.Field
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.internal.util.messages.Messages
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.tools;
|
||
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.java.Field;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.internal.util.messages.Messages;
|
||
|
||
public class JavaElementGeneratorTools {
|
||
public static Field a(String string, FullyQualifiedJavaType fullyQualifiedJavaType, String string2) {
|
||
Field field = new Field(string, fullyQualifiedJavaType);
|
||
field.setVisibility(JavaVisibility.PUBLIC);
|
||
field.setStatic(true);
|
||
field.setFinal(true);
|
||
if (string2 != null) {
|
||
field.setInitializationString(string2);
|
||
}
|
||
return field;
|
||
}
|
||
|
||
public static Field a(String string, JavaVisibility javaVisibility, FullyQualifiedJavaType fullyQualifiedJavaType, String string2) {
|
||
Field field = new Field(string, fullyQualifiedJavaType);
|
||
field.setVisibility(javaVisibility);
|
||
if (string2 != null) {
|
||
field.setInitializationString(string2);
|
||
}
|
||
return field;
|
||
}
|
||
|
||
public static Method a(String string, JavaVisibility javaVisibility, FullyQualifiedJavaType fullyQualifiedJavaType, Parameter ... parameterArray) {
|
||
Method method = new Method(string);
|
||
method.setVisibility(javaVisibility);
|
||
method.setReturnType(fullyQualifiedJavaType);
|
||
if (parameterArray != null) {
|
||
for (Parameter parameter : parameterArray) {
|
||
method.addParameter(parameter);
|
||
}
|
||
}
|
||
return method;
|
||
}
|
||
|
||
public static Method a(Method method, String ... stringArray) {
|
||
if (stringArray != null) {
|
||
for (String string : stringArray) {
|
||
method.addBodyLine(string);
|
||
}
|
||
}
|
||
return method;
|
||
}
|
||
|
||
public static Method a(Field field) {
|
||
Method method = JavaElementGeneratorTools.a("set" + field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1), JavaVisibility.PUBLIC, null, new Parameter(field.getType(), field.getName()));
|
||
return JavaElementGeneratorTools.a(method, "this." + field.getName() + " = " + field.getName() + ";");
|
||
}
|
||
|
||
public static Method b(Field field) {
|
||
Method method = JavaElementGeneratorTools.a("get" + field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1), JavaVisibility.PUBLIC, field.getType(), new Parameter[0]);
|
||
return JavaElementGeneratorTools.a(method, "return this." + field.getName() + ";");
|
||
}
|
||
|
||
public static FullyQualifiedJavaType a(IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType;
|
||
if (introspectedTable.getRules().generateBaseRecordClass()) {
|
||
fullyQualifiedJavaType = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
|
||
} else if (introspectedTable.getRules().generatePrimaryKeyClass()) {
|
||
fullyQualifiedJavaType = new FullyQualifiedJavaType(introspectedTable.getPrimaryKeyType());
|
||
} else {
|
||
throw new RuntimeException(Messages.getString((String)"RuntimeError.12"));
|
||
}
|
||
return fullyQualifiedJavaType;
|
||
}
|
||
|
||
public static FullyQualifiedJavaType b(IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = introspectedTable.getRules().generateRecordWithBLOBsClass() ? new FullyQualifiedJavaType(introspectedTable.getRecordWithBLOBsType()) : new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
|
||
return fullyQualifiedJavaType;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TypeParameter
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.tools;
|
||
|
||
import java.util.Collection;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TypeParameter;
|
||
|
||
public class JavaElementTools {
|
||
public static Method a(Method method) {
|
||
Method method2 = new Method(method.getName());
|
||
for (String string : method.getJavaDocLines()) {
|
||
method2.addJavaDocLine(string);
|
||
}
|
||
method2.setReturnType(method.getReturnType());
|
||
for (String string : method.getParameters()) {
|
||
method2.addParameter(JavaElementTools.a((Parameter)string));
|
||
}
|
||
for (String string : method.getExceptions()) {
|
||
method2.addException((FullyQualifiedJavaType)string);
|
||
}
|
||
for (String string : method.getTypeParameters()) {
|
||
method2.addTypeParameter((TypeParameter)string);
|
||
}
|
||
method2.addBodyLines((Collection)method.getBodyLines());
|
||
method2.setConstructor(method.isConstructor());
|
||
method2.setNative(method.isNative());
|
||
method2.setSynchronized(method.isSynchronized());
|
||
method2.setDefault(method.isDefault());
|
||
method2.setFinal(method.isFinal());
|
||
method2.setStatic(method.isStatic());
|
||
method2.setVisibility(method.getVisibility());
|
||
return method2;
|
||
}
|
||
|
||
public static Parameter a(Parameter parameter) {
|
||
Parameter parameter2 = new Parameter(parameter.getType(), parameter.getName(), parameter.isVarargs());
|
||
for (String string : parameter.getAnnotations()) {
|
||
parameter2.addAnnotation(string);
|
||
}
|
||
return parameter2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.tools;
|
||
|
||
import java.util.Properties;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class PluginUtils {
|
||
private static final String a = "true";
|
||
|
||
public static boolean a(String string) {
|
||
return StringUtility.stringHasValue((String)string) && string.equalsIgnoreCase(a);
|
||
}
|
||
|
||
public static boolean a(String string, Properties properties) {
|
||
String string2 = properties.getProperty(string);
|
||
return PluginUtils.a(string2);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.dom.OutputUtilities
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
* org.mybatis.generator.config.GeneratedKey
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins.tools;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.IntrospectedTableTools;
|
||
import com.google.common.collect.Lists;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.dom.OutputUtilities;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
import org.mybatis.generator.config.GeneratedKey;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class XmlElementGeneratorTools {
|
||
public static Element a(IntrospectedColumn introspectedColumn, GeneratedKey generatedKey) {
|
||
return XmlElementGeneratorTools.a(introspectedColumn, generatedKey, null);
|
||
}
|
||
|
||
public static Element a(IntrospectedColumn introspectedColumn, GeneratedKey generatedKey, String string) {
|
||
String string2 = introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName();
|
||
XmlElement xmlElement = new XmlElement("selectKey");
|
||
xmlElement.addAttribute(new Attribute("resultType", string2));
|
||
xmlElement.addAttribute(new Attribute("keyProperty", (string == null ? "" : string) + introspectedColumn.getJavaProperty()));
|
||
xmlElement.addAttribute(new Attribute("order", generatedKey.getMyBatis3Order()));
|
||
xmlElement.addElement((Element)new TextElement(generatedKey.getRuntimeSqlStatement()));
|
||
return xmlElement;
|
||
}
|
||
|
||
public static Element a(IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = new XmlElement("include");
|
||
xmlElement.addAttribute(new Attribute("refid", introspectedTable.getBaseColumnListId()));
|
||
return xmlElement;
|
||
}
|
||
|
||
public static Element b(IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = new XmlElement("include");
|
||
xmlElement.addAttribute(new Attribute("refid", introspectedTable.getBlobColumnListId()));
|
||
return xmlElement;
|
||
}
|
||
|
||
public static Element c(IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = new XmlElement("if");
|
||
xmlElement.addAttribute(new Attribute("test", "_parameter != null"));
|
||
XmlElement xmlElement2 = new XmlElement("include");
|
||
xmlElement2.addAttribute(new Attribute("refid", introspectedTable.getExampleWhereClauseId()));
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
return xmlElement;
|
||
}
|
||
|
||
public static Element d(IntrospectedTable introspectedTable) {
|
||
XmlElement xmlElement = new XmlElement("if");
|
||
xmlElement.addAttribute(new Attribute("test", "_parameter != null"));
|
||
XmlElement xmlElement2 = new XmlElement("include");
|
||
xmlElement2.addAttribute(new Attribute("refid", introspectedTable.getMyBatis3UpdateByExampleWhereClauseId()));
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
return xmlElement;
|
||
}
|
||
|
||
public static void a(XmlElement xmlElement, IntrospectedTable introspectedTable) {
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedTable, null);
|
||
}
|
||
|
||
public static void a(XmlElement xmlElement, IntrospectedTable introspectedTable, String string) {
|
||
IntrospectedColumn introspectedColumn;
|
||
GeneratedKey generatedKey = introspectedTable.getGeneratedKey();
|
||
if (generatedKey != null && (introspectedColumn = IntrospectedTableTools.a(introspectedTable, generatedKey.getColumn())) != null) {
|
||
xmlElement.addAttribute(new Attribute("useGeneratedKeys", "true"));
|
||
xmlElement.addAttribute(new Attribute("keyProperty", (string == null ? "" : string) + introspectedColumn.getJavaProperty()));
|
||
xmlElement.addAttribute(new Attribute("keyColumn", introspectedColumn.getActualColumnName()));
|
||
}
|
||
}
|
||
|
||
public static List<Element> a(List<IntrospectedColumn> list) {
|
||
return XmlElementGeneratorTools.a(list, false);
|
||
}
|
||
|
||
public static List<Element> a(List<IntrospectedColumn> list, boolean bl) {
|
||
return XmlElementGeneratorTools.a(list, null, bl, 1);
|
||
}
|
||
|
||
public static XmlElement org_mybatis_generator_api_dom_xml_XmlElement_a(List<IntrospectedColumn> list) {
|
||
return XmlElementGeneratorTools.a(list, null);
|
||
}
|
||
|
||
public static XmlElement a(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.a(list, string, true);
|
||
}
|
||
|
||
public static XmlElement a(List<IntrospectedColumn> list, String string, boolean bl) {
|
||
return XmlElementGeneratorTools.a(list, string, bl, 1);
|
||
}
|
||
|
||
public static List<Element> b(List<IntrospectedColumn> list) {
|
||
return XmlElementGeneratorTools.a(list, null);
|
||
}
|
||
|
||
public static List<Element> a(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.a(list, string, true);
|
||
}
|
||
|
||
public static List<Element> a(List<IntrospectedColumn> list, String string, boolean bl) {
|
||
return XmlElementGeneratorTools.a(list, string, bl, 2);
|
||
}
|
||
|
||
public static XmlElement b(List<IntrospectedColumn> list) {
|
||
return XmlElementGeneratorTools.b(list, null);
|
||
}
|
||
|
||
public static XmlElement b(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.b(list, string, true);
|
||
}
|
||
|
||
public static XmlElement b(List<IntrospectedColumn> list, String string, boolean bl) {
|
||
return XmlElementGeneratorTools.a(list, string, bl, 2);
|
||
}
|
||
|
||
public static List<Element> c(List<IntrospectedColumn> list) {
|
||
return XmlElementGeneratorTools.b(list, null);
|
||
}
|
||
|
||
public static List<Element> b(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.a(list, string, false, 3);
|
||
}
|
||
|
||
public static XmlElement c(List<IntrospectedColumn> list) {
|
||
return XmlElementGeneratorTools.c(list, null);
|
||
}
|
||
|
||
public static XmlElement c(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.a(list, string, false, 3);
|
||
}
|
||
|
||
public static List<Element> c(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.a(list, string, true, 1, true);
|
||
}
|
||
|
||
public static List<Element> b(List<IntrospectedColumn> list, String string, boolean bl) {
|
||
return XmlElementGeneratorTools.a(list, string, bl, 2, true);
|
||
}
|
||
|
||
public static List<Element> d(List<IntrospectedColumn> list, String string) {
|
||
return XmlElementGeneratorTools.a(list, string, false, 3, true);
|
||
}
|
||
|
||
private static List<Element> a(List<IntrospectedColumn> list, String string, boolean bl, int n2) {
|
||
return XmlElementGeneratorTools.a(list, string, bl, n2, false);
|
||
}
|
||
|
||
private static List<Element> a(List<IntrospectedColumn> list, String string, boolean bl, int n2, boolean bl2) {
|
||
ArrayList<Element> arrayList = new ArrayList<Element>();
|
||
if (bl2 && XmlElementGeneratorTools.boolean_a(list)) {
|
||
XmlElement xmlElement = XmlElementGeneratorTools.a(bl);
|
||
for (IntrospectedColumn introspectedColumn : list) {
|
||
if (introspectedColumn.isGeneratedAlways() || introspectedColumn.isIdentity()) {
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedColumn, string, n2);
|
||
continue;
|
||
}
|
||
XmlElementGeneratorTools.b(xmlElement, introspectedColumn, string, n2);
|
||
}
|
||
return Arrays.asList(xmlElement);
|
||
}
|
||
StringBuilder stringBuilder = new StringBuilder(bl ? "(" : "");
|
||
Iterator<IntrospectedColumn> iterator = list.iterator();
|
||
while (iterator.hasNext()) {
|
||
IntrospectedColumn introspectedColumn = iterator.next();
|
||
switch (n2) {
|
||
case 3: {
|
||
ArrayList arrayList2 = Lists.newArrayList();
|
||
if (!arrayList2.isEmpty()) {
|
||
if (stringBuilder.length() > 0) {
|
||
arrayList.add((Element)new TextElement(stringBuilder.toString()));
|
||
stringBuilder.setLength(0);
|
||
}
|
||
arrayList.addAll(arrayList2);
|
||
break;
|
||
}
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn));
|
||
stringBuilder.append(" = ");
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)string));
|
||
break;
|
||
}
|
||
case 2: {
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)string));
|
||
break;
|
||
}
|
||
case 1: {
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn));
|
||
}
|
||
}
|
||
if (iterator.hasNext()) {
|
||
stringBuilder.append(", ");
|
||
}
|
||
if (n2 == 1 || n2 == 2) {
|
||
if (stringBuilder.length() <= 80) continue;
|
||
arrayList.add((Element)new TextElement(stringBuilder.toString()));
|
||
stringBuilder.setLength(0);
|
||
OutputUtilities.xmlIndent((StringBuilder)stringBuilder, (int)1);
|
||
continue;
|
||
}
|
||
arrayList.add((Element)new TextElement(stringBuilder.toString()));
|
||
stringBuilder.setLength(0);
|
||
}
|
||
if (stringBuilder.length() > 0 || bl) {
|
||
arrayList.add((Element)new TextElement(stringBuilder.append(bl ? ")" : "").toString()));
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
private static XmlElement a(List<IntrospectedColumn> list, String string, boolean bl, int n2) {
|
||
XmlElement xmlElement = XmlElementGeneratorTools.a(bl);
|
||
for (IntrospectedColumn introspectedColumn : list) {
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedColumn, string, n2);
|
||
}
|
||
return xmlElement;
|
||
}
|
||
|
||
private static XmlElement a(boolean bl) {
|
||
XmlElement xmlElement = new XmlElement("trim");
|
||
if (bl) {
|
||
xmlElement.addAttribute(new Attribute("prefix", "("));
|
||
xmlElement.addAttribute(new Attribute("suffix", ")"));
|
||
xmlElement.addAttribute(new Attribute("suffixOverrides", ","));
|
||
} else {
|
||
xmlElement.addAttribute(new Attribute("suffixOverrides", ","));
|
||
}
|
||
return xmlElement;
|
||
}
|
||
|
||
private static void a(XmlElement xmlElement, IntrospectedColumn introspectedColumn, String string, int n2) {
|
||
if (n2 != 3 && (introspectedColumn.isSequenceColumn() || introspectedColumn.getFullyQualifiedJavaType().isPrimitive())) {
|
||
XmlElementGeneratorTools.b(xmlElement, introspectedColumn, string, n2);
|
||
} else {
|
||
XmlElement xmlElement2 = new XmlElement("if");
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(introspectedColumn.getJavaProperty());
|
||
stringBuilder.append(" != null");
|
||
String string2 = introspectedColumn.getContext().getProperty("checkEmptyForString");
|
||
if (StringUtility.stringHasValue((String)string2) && string2.equalsIgnoreCase("true") && introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName().equals("java.lang.String")) {
|
||
stringBuilder.append(" and " + introspectedColumn.getJavaProperty(string) + " != ''");
|
||
}
|
||
xmlElement2.addAttribute(new Attribute("test", stringBuilder.toString()));
|
||
XmlElementGeneratorTools.b(xmlElement2, introspectedColumn, string, n2);
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
}
|
||
}
|
||
|
||
private static void b(XmlElement xmlElement, IntrospectedColumn introspectedColumn, String string, int n2) {
|
||
switch (n2) {
|
||
case 3: {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
if (!arrayList.isEmpty()) {
|
||
for (Element element : arrayList) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
break;
|
||
}
|
||
xmlElement.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn) + " = " + MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)string) + ","));
|
||
break;
|
||
}
|
||
case 2: {
|
||
xmlElement.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)string) + ","));
|
||
break;
|
||
}
|
||
case 1: {
|
||
xmlElement.addElement((Element)new TextElement(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn) + ","));
|
||
}
|
||
}
|
||
}
|
||
|
||
public static void a(XmlElement xmlElement, List<IntrospectedColumn> list) {
|
||
XmlElementGeneratorTools.a(xmlElement, list, null);
|
||
}
|
||
|
||
public static void a(XmlElement xmlElement, List<IntrospectedColumn> list, String string) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
boolean bl = false;
|
||
for (IntrospectedColumn introspectedColumn : list) {
|
||
stringBuilder.setLength(0);
|
||
if (bl) {
|
||
stringBuilder.append(" and ");
|
||
} else {
|
||
stringBuilder.append("where ");
|
||
bl = true;
|
||
}
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn));
|
||
stringBuilder.append(" = ");
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)string));
|
||
xmlElement.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
}
|
||
}
|
||
|
||
private static boolean boolean_a(List<IntrospectedColumn> list) {
|
||
for (IntrospectedColumn introspectedColumn : list) {
|
||
if (!introspectedColumn.isGeneratedAlways() && !introspectedColumn.isIdentity()) continue;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
public static XmlElement a(String string, IntrospectedColumn introspectedColumn) {
|
||
XmlElement xmlElement = new XmlElement(string);
|
||
xmlElement.addAttribute(new Attribute("column", MyBatis3FormattingUtilities.getRenamedColumnNameForResultMap((IntrospectedColumn)introspectedColumn)));
|
||
xmlElement.addAttribute(new Attribute("property", introspectedColumn.getJavaProperty()));
|
||
xmlElement.addAttribute(new Attribute("jdbcType", introspectedColumn.getJdbcTypeName()));
|
||
if (StringUtility.stringHasValue((String)introspectedColumn.getTypeHandler())) {
|
||
xmlElement.addAttribute(new Attribute("typeHandler", introspectedColumn.getTypeHandler()));
|
||
}
|
||
return xmlElement;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang3.StringEscapeUtils
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import java.util.List;
|
||
import org.apache.commons.lang3.StringEscapeUtils;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
|
||
public class UpdateBatchPlugin
|
||
extends PluginAdapter {
|
||
private FullyQualifiedJavaType a = new FullyQualifiedJavaType("java.util.List");
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
XmlElement xmlElement = document.getRootElement();
|
||
XmlElement xmlElement2 = new XmlElement("update");
|
||
xmlElement2.getAttributes().add(0, new Attribute("id", "updateBatch"));
|
||
xmlElement2.getAttributes().add(new Attribute("parameterType", "java.util.List"));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement2);
|
||
TextElement textElement = new TextElement("update " + introspectedTable.getFullyQualifiedTableNameAtRuntime());
|
||
XmlElement xmlElement3 = new XmlElement("trim");
|
||
xmlElement3.addAttribute(new Attribute("prefix", "set"));
|
||
xmlElement3.addAttribute(new Attribute("suffixOverrides", ","));
|
||
List list = introspectedTable.getPrimaryKeyColumns();
|
||
if (list.size() == 1) {
|
||
String string = this.b((IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0), false);
|
||
List list2 = introspectedTable.getNonPrimaryKeyColumns();
|
||
list2.stream().map(introspectedColumn -> {
|
||
XmlElement xmlElement = new XmlElement("trim");
|
||
xmlElement.addAttribute(new Attribute("prefix", StringEscapeUtils.escapeXml11((String)MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn)) + " = case"));
|
||
xmlElement.addAttribute(new Attribute("suffix", "end,"));
|
||
XmlElement xmlElement2 = new XmlElement("foreach");
|
||
xmlElement2.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement2.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement2.getAttributes().add(2, new Attribute("index", "index"));
|
||
String string2 = "when " + MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)((IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0))) + " = " + string + " then " + this.b((IntrospectedColumn)introspectedColumn, false);
|
||
TextElement textElement = new TextElement(string2);
|
||
xmlElement2.addElement((Element)textElement);
|
||
xmlElement.addElement(0, (Element)xmlElement2);
|
||
return xmlElement;
|
||
}).forEachOrdered(arg_0 -> ((XmlElement)xmlElement3).addElement(arg_0));
|
||
TextElement textElement2 = new TextElement("where " + MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)((IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0))) + " in");
|
||
XmlElement xmlElement4 = new XmlElement("foreach");
|
||
xmlElement4.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement4.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement4.getAttributes().add(1, new Attribute("open", "("));
|
||
xmlElement4.getAttributes().add(2, new Attribute("separator", ", "));
|
||
xmlElement4.getAttributes().add(1, new Attribute("close", ")"));
|
||
xmlElement4.addElement((Element)new TextElement(string));
|
||
xmlElement2.addElement((Element)textElement);
|
||
xmlElement2.addElement((Element)xmlElement3);
|
||
xmlElement2.addElement((Element)textElement2);
|
||
xmlElement2.addElement((Element)xmlElement4);
|
||
} else {
|
||
String string;
|
||
List list3 = introspectedTable.getPrimaryKeyColumns();
|
||
Object object = "concat(";
|
||
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||
object = i2 != list.size() - 1 ? (String)object + this.b((IntrospectedColumn)list3.get(i2), false) + ",'_'," : (String)object + this.b((IntrospectedColumn)list3.get(i2), false) + ")";
|
||
}
|
||
List list4 = introspectedTable.getNonPrimaryKeyColumns();
|
||
Object object2 = "concat(";
|
||
for (int i3 = 0; i3 < list.size(); ++i3) {
|
||
string = (IntrospectedColumn)list.get(i3);
|
||
object2 = i3 != list.size() - 1 ? (String)object2 + MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)string) + ",'_'," : (String)object2 + MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)string) + ")";
|
||
}
|
||
String string2 = object2;
|
||
string = object;
|
||
list4.stream().map(introspectedColumn -> {
|
||
XmlElement xmlElement = new XmlElement("trim");
|
||
xmlElement.addAttribute(new Attribute("prefix", StringEscapeUtils.escapeXml11((String)MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn)) + " = case"));
|
||
xmlElement.addAttribute(new Attribute("suffix", "end,"));
|
||
XmlElement xmlElement2 = new XmlElement("foreach");
|
||
xmlElement2.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement2.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement2.getAttributes().add(2, new Attribute("index", "index"));
|
||
String string3 = "when " + string2 + " = " + string + " then " + this.b((IntrospectedColumn)introspectedColumn, false);
|
||
TextElement textElement = new TextElement(string3);
|
||
xmlElement2.addElement((Element)textElement);
|
||
xmlElement.addElement(0, (Element)xmlElement2);
|
||
return xmlElement;
|
||
}).forEachOrdered(arg_0 -> ((XmlElement)xmlElement3).addElement(arg_0));
|
||
TextElement textElement3 = new TextElement("where " + (String)object2 + " in");
|
||
XmlElement xmlElement5 = new XmlElement("foreach");
|
||
xmlElement5.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement5.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement5.getAttributes().add(1, new Attribute("open", "("));
|
||
xmlElement5.getAttributes().add(2, new Attribute("separator", ", "));
|
||
xmlElement5.getAttributes().add(1, new Attribute("close", ")"));
|
||
xmlElement5.addElement((Element)new TextElement((String)object));
|
||
xmlElement2.addElement((Element)textElement);
|
||
xmlElement2.addElement((Element)xmlElement3);
|
||
xmlElement2.addElement((Element)textElement3);
|
||
xmlElement2.addElement((Element)xmlElement5);
|
||
}
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
}
|
||
return super.sqlMapDocumentGenerated(document, introspectedTable);
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = new FullyQualifiedJavaType(this.a.getShortName());
|
||
fullyQualifiedJavaType.addTypeArgument(JavaElementGeneratorTools.a(introspectedTable));
|
||
Method method = JavaElementGeneratorTools.a("updateBatch", JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(fullyQualifiedJavaType, "list", "@Param(\"list\")"));
|
||
method.setReturnType(new FullyQualifiedJavaType("int"));
|
||
interface_.addImportedType(this.a);
|
||
FormatTools.a(interface_, method);
|
||
}
|
||
return super.clientGenerated(interface_, topLevelClass, introspectedTable);
|
||
}
|
||
|
||
private String a(IntrospectedColumn introspectedColumn, boolean bl) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(introspectedColumn.getActualColumnName());
|
||
stringBuilder.append(" = ");
|
||
if (bl) {
|
||
stringBuilder.append("#{");
|
||
} else {
|
||
stringBuilder.append("#{item.");
|
||
}
|
||
stringBuilder.append(introspectedColumn.getJavaProperty());
|
||
stringBuilder.append(",jdbcType=");
|
||
stringBuilder.append(introspectedColumn.getJdbcTypeName());
|
||
stringBuilder.append("}");
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
private String b(IntrospectedColumn introspectedColumn, boolean bl) {
|
||
if (bl) {
|
||
return MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, null);
|
||
}
|
||
return MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item.");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.ListUtilities
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
* org.mybatis.generator.internal.util.StringUtility
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import java.util.List;
|
||
import java.util.Properties;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.ListUtilities;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
import org.mybatis.generator.internal.util.StringUtility;
|
||
|
||
public class UpdateBatchPlugin2UseMultiQueries
|
||
extends PluginAdapter {
|
||
private FullyQualifiedJavaType var_org_mybatis_generator_api_dom_java_FullyQualifiedJavaType_a = new FullyQualifiedJavaType("java.util.List");
|
||
private String var_java_lang_String_a = "updateBatch";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
XmlElement xmlElement = document.getRootElement();
|
||
XmlElement xmlElement2 = new XmlElement("update");
|
||
xmlElement2.getAttributes().add(0, new Attribute("id", this.var_java_lang_String_a));
|
||
xmlElement2.getAttributes().add(new Attribute("parameterType", "java.util.List"));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement2);
|
||
XmlElement xmlElement3 = new XmlElement("foreach");
|
||
xmlElement3.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement3.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement3.getAttributes().add(2, new Attribute("separator", ";"));
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append("update ");
|
||
stringBuilder.append(introspectedTable.getFullyQualifiedTableNameAtRuntime());
|
||
xmlElement3.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
XmlElement xmlElement4 = new XmlElement("set");
|
||
xmlElement3.addElement((Element)xmlElement4);
|
||
for (IntrospectedColumn introspectedColumn : ListUtilities.removeGeneratedAlwaysColumns((List)introspectedTable.getNonPrimaryKeyColumns())) {
|
||
XmlElement xmlElement5 = UpdateBatchPlugin2UseMultiQueries.a(introspectedColumn, "item.");
|
||
xmlElement4.addElement((Element)xmlElement5);
|
||
stringBuilder.setLength(0);
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn));
|
||
stringBuilder.append(" = ");
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item."));
|
||
stringBuilder.append(',');
|
||
xmlElement5.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
}
|
||
boolean bl = false;
|
||
for (IntrospectedColumn introspectedColumn : introspectedTable.getPrimaryKeyColumns()) {
|
||
stringBuilder.setLength(0);
|
||
if (bl) {
|
||
stringBuilder.append(" and ");
|
||
} else {
|
||
stringBuilder.append("where ");
|
||
bl = true;
|
||
}
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn));
|
||
stringBuilder.append(" = ");
|
||
stringBuilder.append(MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item."));
|
||
xmlElement3.addElement((Element)new TextElement(stringBuilder.toString()));
|
||
}
|
||
xmlElement2.addElement((Element)xmlElement3);
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
}
|
||
return super.sqlMapDocumentGenerated(document, introspectedTable);
|
||
}
|
||
|
||
public static XmlElement a(IntrospectedColumn introspectedColumn, String string) {
|
||
XmlElement xmlElement = new XmlElement("if");
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(string + introspectedColumn.getJavaProperty());
|
||
stringBuilder.append(" != null");
|
||
String string2 = introspectedColumn.getContext().getProperty("checkEmptyForString");
|
||
if (StringUtility.stringHasValue((String)string2) && string2.equalsIgnoreCase("true") && introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName().equals("java.lang.String")) {
|
||
stringBuilder.append(" and " + string + introspectedColumn.getJavaProperty() + " != ''");
|
||
}
|
||
xmlElement.addAttribute(new Attribute("test", stringBuilder.toString()));
|
||
return xmlElement;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = new FullyQualifiedJavaType(this.var_org_mybatis_generator_api_dom_java_FullyQualifiedJavaType_a.getShortName());
|
||
fullyQualifiedJavaType.addTypeArgument(JavaElementGeneratorTools.a(introspectedTable));
|
||
Method method = JavaElementGeneratorTools.a(this.var_java_lang_String_a, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(fullyQualifiedJavaType, "list", "@Param(\"list\")"));
|
||
method.setReturnType(new FullyQualifiedJavaType("int"));
|
||
interface_.addImportedType(this.var_org_mybatis_generator_api_dom_java_FullyQualifiedJavaType_a);
|
||
FormatTools.a(interface_, method);
|
||
}
|
||
return super.clientGenerated(interface_, topLevelClass, introspectedTable);
|
||
}
|
||
|
||
private String a(IntrospectedColumn introspectedColumn, boolean bl) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(introspectedColumn.getActualColumnName());
|
||
stringBuilder.append(" = ");
|
||
if (bl) {
|
||
stringBuilder.append("#{");
|
||
} else {
|
||
stringBuilder.append("#{item.");
|
||
}
|
||
stringBuilder.append(introspectedColumn.getJavaProperty());
|
||
stringBuilder.append(",jdbcType=");
|
||
stringBuilder.append(introspectedColumn.getJdbcTypeName());
|
||
stringBuilder.append("}");
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
public void setProperties(Properties properties) {
|
||
super.setProperties(properties);
|
||
String string = properties.getProperty("updateBatch");
|
||
if (StringUtility.isTrue((String)string)) {
|
||
this.var_java_lang_String_a = "updateBatchUseMultiQuery";
|
||
}
|
||
}
|
||
|
||
private String b(IntrospectedColumn introspectedColumn, boolean bl) {
|
||
if (bl) {
|
||
return MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, null);
|
||
}
|
||
return MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item.");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang3.StringEscapeUtils
|
||
* org.mybatis.generator.api.IntrospectedColumn
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import java.util.List;
|
||
import org.apache.commons.lang3.StringEscapeUtils;
|
||
import org.mybatis.generator.api.IntrospectedColumn;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities;
|
||
|
||
public class UpdateBatchSelectivePlugin
|
||
extends PluginAdapter {
|
||
private FullyQualifiedJavaType a = new FullyQualifiedJavaType("java.util.List");
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
XmlElement xmlElement = document.getRootElement();
|
||
XmlElement xmlElement2 = new XmlElement("update");
|
||
xmlElement2.getAttributes().add(0, new Attribute("id", "updateBatchSelective"));
|
||
xmlElement2.getAttributes().add(new Attribute("parameterType", "java.util.List"));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement2);
|
||
TextElement textElement = new TextElement("update " + introspectedTable.getFullyQualifiedTableNameAtRuntime());
|
||
XmlElement xmlElement3 = new XmlElement("trim");
|
||
xmlElement3.addAttribute(new Attribute("prefix", "set"));
|
||
xmlElement3.addAttribute(new Attribute("suffixOverrides", ","));
|
||
String string = this.b((IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0), false);
|
||
List list = introspectedTable.getNonPrimaryKeyColumns();
|
||
list.stream().map(introspectedColumn -> {
|
||
XmlElement xmlElement = new XmlElement("trim");
|
||
xmlElement.addAttribute(new Attribute("prefix", StringEscapeUtils.escapeXml11((String)MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)introspectedColumn)) + " = case"));
|
||
xmlElement.addAttribute(new Attribute("suffix", "end,"));
|
||
XmlElement xmlElement2 = new XmlElement("foreach");
|
||
xmlElement2.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement2.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement2.getAttributes().add(2, new Attribute("index", "index"));
|
||
XmlElement xmlElement3 = new XmlElement("if");
|
||
xmlElement3.addAttribute(new Attribute("test", "item." + introspectedColumn.getJavaProperty() + " != null"));
|
||
String string2 = "when " + MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)((IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0))) + " = " + string + " then " + this.b((IntrospectedColumn)introspectedColumn, false);
|
||
TextElement textElement = new TextElement(string2);
|
||
xmlElement3.addElement((Element)textElement);
|
||
xmlElement2.addElement(0, (Element)xmlElement3);
|
||
xmlElement.addElement(0, (Element)xmlElement2);
|
||
return xmlElement;
|
||
}).forEachOrdered(arg_0 -> ((XmlElement)xmlElement3).addElement(arg_0));
|
||
TextElement textElement2 = new TextElement("where " + MyBatis3FormattingUtilities.getEscapedColumnName((IntrospectedColumn)((IntrospectedColumn)introspectedTable.getPrimaryKeyColumns().get(0))) + " in");
|
||
XmlElement xmlElement4 = new XmlElement("foreach");
|
||
xmlElement4.getAttributes().add(0, new Attribute("collection", "list"));
|
||
xmlElement4.getAttributes().add(1, new Attribute("item", "item"));
|
||
xmlElement4.getAttributes().add(1, new Attribute("open", "("));
|
||
xmlElement4.getAttributes().add(2, new Attribute("separator", ", "));
|
||
xmlElement4.getAttributes().add(1, new Attribute("close", ")"));
|
||
xmlElement4.addElement((Element)new TextElement(string));
|
||
xmlElement2.addElement((Element)textElement);
|
||
xmlElement2.addElement((Element)xmlElement3);
|
||
xmlElement2.addElement((Element)textElement2);
|
||
xmlElement2.addElement((Element)xmlElement4);
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
}
|
||
return super.sqlMapDocumentGenerated(document, introspectedTable);
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
if (introspectedTable.hasPrimaryKeyColumns()) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType = new FullyQualifiedJavaType(this.a.getShortName());
|
||
fullyQualifiedJavaType.addTypeArgument(JavaElementGeneratorTools.a(introspectedTable));
|
||
Method method = JavaElementGeneratorTools.a("updateBatchSelective", JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(fullyQualifiedJavaType, "list", "@Param(\"list\")"));
|
||
method.setReturnType(new FullyQualifiedJavaType("int"));
|
||
interface_.addImportedType(this.a);
|
||
FormatTools.a(interface_, method);
|
||
}
|
||
return super.clientGenerated(interface_, topLevelClass, introspectedTable);
|
||
}
|
||
|
||
private String a(IntrospectedColumn introspectedColumn, boolean bl) {
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
stringBuilder.append(introspectedColumn.getActualColumnName());
|
||
stringBuilder.append(" = ");
|
||
if (bl) {
|
||
stringBuilder.append("#{");
|
||
} else {
|
||
stringBuilder.append("#{item.");
|
||
}
|
||
stringBuilder.append(introspectedColumn.getJavaProperty());
|
||
stringBuilder.append(",jdbcType=");
|
||
stringBuilder.append(introspectedColumn.getJdbcTypeName());
|
||
stringBuilder.append("}");
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
private String b(IntrospectedColumn introspectedColumn, boolean bl) {
|
||
if (bl) {
|
||
return MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, null);
|
||
}
|
||
return MyBatis3FormattingUtilities.getParameterClause((IntrospectedColumn)introspectedColumn, (String)"item.");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.mybatis.generator.api.IntrospectedTable
|
||
* org.mybatis.generator.api.PluginAdapter
|
||
* org.mybatis.generator.api.dom.java.FullyQualifiedJavaType
|
||
* org.mybatis.generator.api.dom.java.Interface
|
||
* org.mybatis.generator.api.dom.java.JavaVisibility
|
||
* org.mybatis.generator.api.dom.java.Method
|
||
* org.mybatis.generator.api.dom.java.Parameter
|
||
* org.mybatis.generator.api.dom.java.TopLevelClass
|
||
* org.mybatis.generator.api.dom.xml.Attribute
|
||
* org.mybatis.generator.api.dom.xml.Document
|
||
* org.mybatis.generator.api.dom.xml.Element
|
||
* org.mybatis.generator.api.dom.xml.TextElement
|
||
* org.mybatis.generator.api.dom.xml.XmlElement
|
||
* org.mybatis.generator.codegen.mybatis3.ListUtilities
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.plugins;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.FormatTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.JavaElementGeneratorTools;
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.tools.XmlElementGeneratorTools;
|
||
import java.util.List;
|
||
import org.mybatis.generator.api.IntrospectedTable;
|
||
import org.mybatis.generator.api.PluginAdapter;
|
||
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
|
||
import org.mybatis.generator.api.dom.java.Interface;
|
||
import org.mybatis.generator.api.dom.java.JavaVisibility;
|
||
import org.mybatis.generator.api.dom.java.Method;
|
||
import org.mybatis.generator.api.dom.java.Parameter;
|
||
import org.mybatis.generator.api.dom.java.TopLevelClass;
|
||
import org.mybatis.generator.api.dom.xml.Attribute;
|
||
import org.mybatis.generator.api.dom.xml.Document;
|
||
import org.mybatis.generator.api.dom.xml.Element;
|
||
import org.mybatis.generator.api.dom.xml.TextElement;
|
||
import org.mybatis.generator.api.dom.xml.XmlElement;
|
||
import org.mybatis.generator.codegen.mybatis3.ListUtilities;
|
||
|
||
public class UpsertPlugin
|
||
extends PluginAdapter {
|
||
public static final String a = "insertOrUpdate";
|
||
public static final String b = "insertOrUpdateWithBLOBs";
|
||
public static final String c = "insertOrUpdateSelective";
|
||
|
||
public boolean validate(List<String> list) {
|
||
return true;
|
||
}
|
||
|
||
public boolean clientGenerated(Interface interface_, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||
FullyQualifiedJavaType fullyQualifiedJavaType;
|
||
Method method = JavaElementGeneratorTools.a(a, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(JavaElementGeneratorTools.a(introspectedTable), "record"));
|
||
FormatTools.a(interface_, method);
|
||
if (introspectedTable.hasBLOBColumns()) {
|
||
fullyQualifiedJavaType = JavaElementGeneratorTools.a(b, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(JavaElementGeneratorTools.b(introspectedTable), "record"));
|
||
FormatTools.a(interface_, (Method)fullyQualifiedJavaType);
|
||
}
|
||
fullyQualifiedJavaType = introspectedTable.getRules().calculateAllFieldsClass();
|
||
Method method2 = JavaElementGeneratorTools.a(c, JavaVisibility.DEFAULT, FullyQualifiedJavaType.getIntInstance(), new Parameter(fullyQualifiedJavaType, "record"));
|
||
FormatTools.a(interface_, method2);
|
||
return super.clientGenerated(interface_, topLevelClass, introspectedTable);
|
||
}
|
||
|
||
public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
|
||
this.a(document, introspectedTable, false);
|
||
if (introspectedTable.hasBLOBColumns()) {
|
||
this.a(document, introspectedTable, true);
|
||
}
|
||
this.a(document, introspectedTable);
|
||
return super.sqlMapDocumentGenerated(document, introspectedTable);
|
||
}
|
||
|
||
private void a(Document document, IntrospectedTable introspectedTable) {
|
||
List list = ListUtilities.removeGeneratedAlwaysColumns((List)introspectedTable.getAllColumns());
|
||
XmlElement xmlElement = new XmlElement("insert");
|
||
xmlElement.addAttribute(new Attribute("id", c));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement);
|
||
xmlElement.addAttribute(new Attribute("parameterType", introspectedTable.getRules().calculateAllFieldsClass().getFullyQualifiedName()));
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedTable);
|
||
xmlElement.addElement((Element)new TextElement("insert into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
XmlElement xmlElement2 = XmlElementGeneratorTools.org_mybatis_generator_api_dom_xml_XmlElement_a(list);
|
||
xmlElement.addElement((Element)xmlElement2);
|
||
xmlElement.addElement((Element)new TextElement("values"));
|
||
XmlElement xmlElement3 = XmlElementGeneratorTools.b(list);
|
||
xmlElement.addElement((Element)xmlElement3);
|
||
xmlElement.addElement((Element)new TextElement("on duplicate key update "));
|
||
XmlElement xmlElement4 = XmlElementGeneratorTools.c(list);
|
||
xmlElement.addElement((Element)xmlElement4);
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
}
|
||
|
||
private void a(Document document, IntrospectedTable introspectedTable, boolean bl) {
|
||
List list = ListUtilities.removeGeneratedAlwaysColumns((List)(bl ? introspectedTable.getAllColumns() : introspectedTable.getNonBLOBColumns()));
|
||
XmlElement xmlElement = new XmlElement("insert");
|
||
xmlElement.addAttribute(new Attribute("id", bl ? b : a));
|
||
this.getContext().getCommentGenerator().addComment(xmlElement);
|
||
xmlElement.addAttribute(new Attribute("parameterType", bl ? JavaElementGeneratorTools.b(introspectedTable).getFullyQualifiedName() : JavaElementGeneratorTools.a(introspectedTable).getFullyQualifiedName()));
|
||
XmlElementGeneratorTools.a(xmlElement, introspectedTable);
|
||
xmlElement.addElement((Element)new TextElement("insert into " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
for (Element element : XmlElementGeneratorTools.c(list, null)) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
xmlElement.addElement((Element)new TextElement("values"));
|
||
for (Element element : XmlElementGeneratorTools.b(list, null, true)) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
xmlElement.addElement((Element)new TextElement("on duplicate key update "));
|
||
for (Element element : XmlElementGeneratorTools.d(list, null)) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
document.getRootElement().addElement((Element)xmlElement);
|
||
}
|
||
|
||
private void a(IntrospectedTable introspectedTable, XmlElement xmlElement, List<Element> list) {
|
||
xmlElement.addElement((Element)new TextElement("select"));
|
||
for (Element element : list) {
|
||
xmlElement.addElement(element);
|
||
}
|
||
xmlElement.addElement((Element)new TextElement("from dual where not exists"));
|
||
xmlElement.addElement((Element)new TextElement("("));
|
||
xmlElement.addElement((Element)new TextElement("select 1 from " + introspectedTable.getFullyQualifiedTableNameAtRuntime()));
|
||
xmlElement.addElement(XmlElementGeneratorTools.d(introspectedTable));
|
||
xmlElement.addElement((Element)new TextElement(")"));
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.intellij.openapi.project.Project;
|
||
|
||
public class v {
|
||
public static ThreadLocal<Project> a = new ThreadLocal();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
public class w {
|
||
private String a;
|
||
private String b;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String toString() {
|
||
return this.a + ":" + this.b;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
public interface PropertyNameConverter {
|
||
public String convertColumnNameToPropertyName(String var1);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang.StringUtils
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator;
|
||
|
||
import com.ccnode.codegenerator.ad.z;
|
||
import com.ccnode.codegenerator.mybatisGenerator.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.b;
|
||
import com.ccnode.codegenerator.myconfigurable.MyColumnOverride;
|
||
import com.ccnode.codegenerator.myconfigurable.MyIgnoredColumn;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.TableGenerateConfig;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.Set;
|
||
import java.util.stream.Collectors;
|
||
import org.apache.commons.lang.StringUtils;
|
||
|
||
public class y {
|
||
public static List<a> a(List<a> list, TableGenerateConfig tableGenerateConfig, Profile profile) {
|
||
List list2 = (List)z.a().deepClone(list);
|
||
if (tableGenerateConfig == null) {
|
||
return list2;
|
||
}
|
||
Set set = tableGenerateConfig.getIgnoredColums().stream().map(MyIgnoredColumn::getColumnName).collect(Collectors.toSet());
|
||
Map<String, MyColumnOverride> map = tableGenerateConfig.getColumnOverrideList().stream().collect(Collectors.toMap(MyColumnOverride::getColumnName, myColumnOverride -> myColumnOverride));
|
||
for (a a2 : list2) {
|
||
Object object;
|
||
String string = a2.java_lang_String_a();
|
||
if (set.contains(string)) {
|
||
a2.a(false);
|
||
continue;
|
||
}
|
||
if (map.containsKey(string)) {
|
||
object = map.get(string);
|
||
if (StringUtils.isNotBlank((String)((MyColumnOverride)object).getJavaProperty())) {
|
||
a2.b(((MyColumnOverride)object).getJavaProperty());
|
||
}
|
||
if (StringUtils.isNotBlank((String)((MyColumnOverride)object).getJavaType()) && !profile.getUseTypeMapper()) {
|
||
a2.c(((MyColumnOverride)object).getJavaType());
|
||
}
|
||
if (StringUtils.isNotBlank((String)((MyColumnOverride)object).getTypeHandler())) {
|
||
a2.d(((MyColumnOverride)object).getTypeHandler());
|
||
}
|
||
if (StringUtils.isNotBlank((String)((MyColumnOverride)object).getJdbcType())) {
|
||
a2.a(((MyColumnOverride)object).getJdbcType());
|
||
}
|
||
}
|
||
if (!profile.getConvertByteOrShortToInt() || !((String)(object = a2.d())).equals(Byte.class.getName()) && !((String)object).equals(Short.class.getName())) continue;
|
||
a2.c(Integer.class.getName());
|
||
}
|
||
return list2;
|
||
}
|
||
|
||
public static List<a> a(List<a> list, Boolean bl) {
|
||
List list2 = (List)z.a().deepClone(list);
|
||
if (!bl.booleanValue()) {
|
||
return list2;
|
||
}
|
||
for (a a2 : list2) {
|
||
if (!bl.booleanValue()) continue;
|
||
a2.b(a2.java_lang_String_a());
|
||
}
|
||
return list2;
|
||
}
|
||
|
||
public static b a(List<a> list, List<a> list2, Profile profile) {
|
||
b b2 = new b();
|
||
Map<String, a> map = list.stream().collect(Collectors.toMap(a::a, a2 -> a2));
|
||
for (a a3 : list2) {
|
||
Object object;
|
||
a a4 = map.get(a3.java_lang_String_a());
|
||
if (!a3.boolean_a()) {
|
||
object = new MyIgnoredColumn(a3.java_lang_String_a());
|
||
b2.b().add((MyIgnoredColumn)object);
|
||
continue;
|
||
}
|
||
if (a3.equals(a4) && !profile.getUseTypeMapper()) continue;
|
||
object = new MyColumnOverride(a3.java_lang_String_a());
|
||
if (profile.getUseTypeMapper()) {
|
||
((MyColumnOverride)object).setJavaType(a4.d());
|
||
} else if (!a3.d().equals(a4.d())) {
|
||
((MyColumnOverride)object).setJavaType(a3.d());
|
||
}
|
||
if (!a3.java_lang_String_b().equals(a4.java_lang_String_b())) {
|
||
((MyColumnOverride)object).setJdbcType(a3.java_lang_String_b());
|
||
}
|
||
if (StringUtils.isNotBlank((String)a3.e())) {
|
||
((MyColumnOverride)object).setTypeHandler(a3.e());
|
||
}
|
||
if (!a3.c().equals(a4.c())) {
|
||
((MyColumnOverride)object).setJavaProperty(a3.c());
|
||
}
|
||
b2.a().add((MyColumnOverride)object);
|
||
}
|
||
return b2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.EditorSettings
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.d;
|
||
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.EditorSettings;
|
||
|
||
public class a {
|
||
public static void a(Editor editor) {
|
||
EditorSettings editorSettings = editor.getSettings();
|
||
editorSettings.setVirtualSpace(false);
|
||
editorSettings.setLineMarkerAreaShown(false);
|
||
editorSettings.setIndentGuidesShown(false);
|
||
editorSettings.setLineNumbersShown(true);
|
||
editorSettings.setFoldingOutlineShown(true);
|
||
editorSettings.setAdditionalColumnsCount(3);
|
||
editorSettings.setAdditionalLinesCount(3);
|
||
editorSettings.setCaretRowShown(false);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.diff.DiffManager
|
||
* com.intellij.diff.contents.DiffContent
|
||
* com.intellij.diff.contents.DocumentContent
|
||
* com.intellij.diff.contents.DocumentContentImpl
|
||
* com.intellij.diff.merge.MergeRequest
|
||
* com.intellij.diff.requests.DiffRequest
|
||
* com.intellij.diff.requests.SimpleDiffRequest
|
||
* com.intellij.ide.highlighter.JavaFileType
|
||
* com.intellij.ide.highlighter.XmlFileType
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.impl.DocumentImpl
|
||
* com.intellij.openapi.fileEditor.FileDocumentManager
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.psi.PsiAnnotation
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.psi.PsiJavaFile
|
||
* com.intellij.psi.PsiMethod
|
||
* com.intellij.psi.PsiModifierList
|
||
* com.intellij.psi.codeStyle.CodeStyleManager
|
||
* com.intellij.psi.codeStyle.JavaCodeStyleManager
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.testFramework.LightVirtualFile
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.d;
|
||
|
||
import com.ccnode.codegenerator.ad.s_0;
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d.d;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.diff.DiffManager;
|
||
import com.intellij.diff.contents.DiffContent;
|
||
import com.intellij.diff.contents.DocumentContent;
|
||
import com.intellij.diff.contents.DocumentContentImpl;
|
||
import com.intellij.diff.merge.MergeRequest;
|
||
import com.intellij.diff.requests.DiffRequest;
|
||
import com.intellij.diff.requests.SimpleDiffRequest;
|
||
import com.intellij.ide.highlighter.JavaFileType;
|
||
import com.intellij.ide.highlighter.XmlFileType;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.impl.DocumentImpl;
|
||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.psi.PsiAnnotation;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.psi.PsiJavaFile;
|
||
import com.intellij.psi.PsiMethod;
|
||
import com.intellij.psi.PsiModifierList;
|
||
import com.intellij.psi.codeStyle.CodeStyleManager;
|
||
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.testFramework.LightVirtualFile;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Objects;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b {
|
||
public static String java_lang_String_a(String string, PsiClass psiClass, Project project) {
|
||
try {
|
||
PsiClass psiClass2 = b.com_intellij_psi_PsiClass_a(string, psiClass, project);
|
||
List<PsiMethod> list = b.a(psiClass2.getMethods(), psiClass.getMethods());
|
||
b.a(project, psiClass2, list);
|
||
return psiClass2.getContainingFile().getText();
|
||
}
|
||
catch (Exception exception) {
|
||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||
throw new RuntimeException("merge mapper catch exception", exception);
|
||
}
|
||
return psiClass.getText();
|
||
}
|
||
}
|
||
|
||
public static String b(String string, PsiClass psiClass, Project project) {
|
||
try {
|
||
PsiClass psiClass2 = b.com_intellij_psi_PsiClass_a(string, psiClass, project);
|
||
PsiClass psiClass3 = b.com_intellij_psi_PsiClass_a(psiClass.getContainingFile().getText(), psiClass, project);
|
||
List<PsiMethod> list = b.a(psiClass3.getMethods(), psiClass2.getMethods());
|
||
if (list.size() > 0) {
|
||
b.a(project, psiClass3, list);
|
||
return psiClass3.getContainingFile().getText();
|
||
}
|
||
return null;
|
||
}
|
||
catch (Exception exception) {
|
||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||
throw new RuntimeException("merge mapper catch exception", exception);
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
private static PsiClass com_intellij_psi_PsiClass_a(String string, PsiClass psiClass, Project project) {
|
||
string = string.replace("\r\n", "\n");
|
||
JavaFileType javaFileType = JavaFileType.INSTANCE;
|
||
PsiJavaFile psiJavaFile = (PsiJavaFile)PsiFileFactory.getInstance((Project)project).createFileFromText(psiClass.getName(), (FileType)javaFileType, (CharSequence)string);
|
||
return psiJavaFile.getClasses()[0];
|
||
}
|
||
|
||
private static void a(Project project, PsiClass psiClass, List<PsiMethod> list) {
|
||
WriteCommandAction.runWriteCommandAction((Project)project, (Runnable)new Runnable(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ PsiClass var_com_intellij_psi_PsiClass_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
{
|
||
this.var_java_util_List_a = list;
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
for (PsiMethod psiMethod : this.var_java_util_List_a) {
|
||
this.var_com_intellij_psi_PsiClass_a.add((PsiElement)psiMethod);
|
||
}
|
||
JavaCodeStyleManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).shortenClassReferences((PsiElement)this.var_com_intellij_psi_PsiClass_a);
|
||
CodeStyleManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).reformat((PsiElement)this.var_com_intellij_psi_PsiClass_a.getContainingFile());
|
||
}
|
||
});
|
||
}
|
||
|
||
@NotNull
|
||
private static List<PsiMethod> a(PsiMethod[] psiMethodArray, PsiMethod[] psiMethodArray2) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (PsiMethod psiMethod : psiMethodArray2) {
|
||
boolean bl = false;
|
||
for (PsiMethod psiMethod2 : psiMethodArray) {
|
||
if (!b.a(psiMethod, psiMethod2)) continue;
|
||
bl = true;
|
||
break;
|
||
}
|
||
if (bl) continue;
|
||
arrayList.add(psiMethod);
|
||
}
|
||
return arrayList;
|
||
}
|
||
|
||
private static boolean a(PsiMethod psiMethod, PsiMethod psiMethod2) {
|
||
return psiMethod2.getName().equals(psiMethod.getName()) && psiMethod2.getParameterList().getParameters().length == psiMethod.getParameterList().getParameters().length;
|
||
}
|
||
|
||
public static String c(String string, PsiClass psiClass, Project project) {
|
||
boolean bl = e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(project).getModelAutoMerge();
|
||
if (bl) {
|
||
try {
|
||
PsiField[] psiFieldArray;
|
||
PsiClass psiClass2 = b.com_intellij_psi_PsiClass_a(string, psiClass, project);
|
||
PsiMethod[] psiMethodArray = psiClass.getMethods();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
for (PsiMethod psiMethod : psiMethodArray) {
|
||
if (!b.a(psiMethod, psiClass)) continue;
|
||
arrayList.add(psiMethod);
|
||
}
|
||
ArrayList arrayList2 = Lists.newArrayList();
|
||
PsiField[] psiFieldArray2 = psiClass2.getFields();
|
||
for (PsiField psiField : psiFieldArray2) {
|
||
if (!psiField.hasModifierProperty("static")) continue;
|
||
arrayList2.add(psiField.getName());
|
||
}
|
||
ArrayList arrayList3 = Lists.newArrayList();
|
||
for (PsiField psiField : psiClass.getFields()) {
|
||
if (t_0.var_com_ccnode_codegenerator_ad_t_0_a.a(psiField) || arrayList2.contains(psiField.getName())) continue;
|
||
arrayList3.add(psiField);
|
||
}
|
||
PsiField[] psiFieldArray3 = psiClass.getFields();
|
||
for (PsiField psiField : psiFieldArray = psiClass2.getFields()) {
|
||
for (PsiField psiField2 : psiFieldArray3) {
|
||
PsiAnnotation[] psiAnnotationArray;
|
||
PsiModifierList psiModifierList;
|
||
if (psiField == null || !Objects.equals(psiField.getName(), psiField2.getName()) || (psiModifierList = psiField2.getModifierList()) == null) continue;
|
||
for (PsiAnnotation psiAnnotation : psiAnnotationArray = psiModifierList.getAnnotations()) {
|
||
String string2 = psiAnnotation.getQualifiedName();
|
||
if (string2 == null || !string2.contains("TableLogic") && !string2.contains("JsonProperty") && !string2.contains("FieldLog")) continue;
|
||
WriteCommandAction.runWriteCommandAction((Project)project, (Runnable)new Runnable(){
|
||
final /* synthetic */ PsiField var_com_intellij_psi_PsiField_a;
|
||
final /* synthetic */ PsiAnnotation var_com_intellij_psi_PsiAnnotation_a;
|
||
{
|
||
this.var_com_intellij_psi_PsiField_a = psiField;
|
||
this.var_com_intellij_psi_PsiAnnotation_a = psiAnnotation;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
PsiModifierList psiModifierList = this.var_com_intellij_psi_PsiField_a.getModifierList();
|
||
if (psiModifierList != null) {
|
||
psiModifierList.add((PsiElement)this.var_com_intellij_psi_PsiAnnotation_a);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
WriteCommandAction.runWriteCommandAction((Project)project, (Runnable)new Runnable(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ PsiClass var_com_intellij_psi_PsiClass_a;
|
||
final /* synthetic */ List b;
|
||
{
|
||
this.var_java_util_List_a = list;
|
||
this.var_com_intellij_psi_PsiClass_a = psiClass;
|
||
this.b = list2;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
for (PsiMethod psiMethod : this.var_java_util_List_a) {
|
||
this.var_com_intellij_psi_PsiClass_a.add((PsiElement)psiMethod);
|
||
}
|
||
for (PsiMethod psiMethod : this.b) {
|
||
this.var_com_intellij_psi_PsiClass_a.add((PsiElement)psiMethod);
|
||
}
|
||
}
|
||
});
|
||
CodeStyleManager.getInstance((Project)project).reformat((PsiElement)psiClass2);
|
||
JavaCodeStyleManager.getInstance((Project)project).shortenClassReferences((PsiElement)psiClass2);
|
||
return psiClass2.getContainingFile().getText();
|
||
}
|
||
catch (Exception exception) {
|
||
return psiClass.getContainingFile().getText();
|
||
}
|
||
}
|
||
return b.d(string, psiClass, project);
|
||
}
|
||
|
||
@NotNull
|
||
private static String d(String string, PsiClass psiClass, Project project) {
|
||
VirtualFile virtualFile = psiClass.getContainingFile().getVirtualFile();
|
||
String string2 = string.replace("\r\n", "\n");
|
||
String string3 = psiClass.getContainingFile().getText().replace("\r\n", "\n");
|
||
LightVirtualFile lightVirtualFile = new LightVirtualFile("bb.java", (FileType)JavaFileType.INSTANCE, (CharSequence)string3);
|
||
lightVirtualFile.setWritable(false);
|
||
DocumentContentImpl documentContentImpl = new DocumentContentImpl(project, (Document)new DocumentImpl(string3), (FileType)JavaFileType.INSTANCE, (VirtualFile)lightVirtualFile, null, null, null);
|
||
LightVirtualFile lightVirtualFile2 = new LightVirtualFile("ss.java", (FileType)JavaFileType.INSTANCE, (CharSequence)string2);
|
||
lightVirtualFile2.setWritable(false);
|
||
DocumentContentImpl documentContentImpl2 = new DocumentContentImpl(project, (Document)new DocumentImpl(string2), (FileType)JavaFileType.INSTANCE, (VirtualFile)lightVirtualFile2, null, null, null);
|
||
Document document = FileDocumentManager.getInstance().getDocument(virtualFile);
|
||
DocumentContentImpl documentContentImpl3 = new DocumentContentImpl(project, document, (FileType)JavaFileType.INSTANCE, virtualFile, null, null, null);
|
||
d d2 = new d(project, (DocumentContent)documentContentImpl3, string3, Lists.newArrayList((Object[])new DocumentContent[]{documentContentImpl, documentContentImpl3, documentContentImpl2}), "merge result", Lists.newArrayList((Object[])new String[]{"origin", "result", "new source"}));
|
||
DiffManager.getInstance().showMerge(project, (MergeRequest)d2);
|
||
PsiDocumentManager.getInstance((Project)project).doPostponedOperationsAndUnblockDocument(document);
|
||
FileDocumentManager.getInstance().saveDocument(document);
|
||
return document.getText();
|
||
}
|
||
|
||
@NotNull
|
||
public static String a(String string, XmlFile xmlFile, Project project) {
|
||
VirtualFile virtualFile = xmlFile.getContainingFile().getVirtualFile();
|
||
String string2 = string.replace("\r\n", "\n");
|
||
String string3 = xmlFile.getContainingFile().getText().replace("\r\n", "\n");
|
||
LightVirtualFile lightVirtualFile = new LightVirtualFile("bb.xml", (FileType)XmlFileType.INSTANCE, (CharSequence)string3);
|
||
lightVirtualFile.setWritable(false);
|
||
DocumentContentImpl documentContentImpl = new DocumentContentImpl(project, (Document)new DocumentImpl(string3), (FileType)XmlFileType.INSTANCE, (VirtualFile)lightVirtualFile, null, null, null);
|
||
LightVirtualFile lightVirtualFile2 = new LightVirtualFile("ss.xml", (FileType)XmlFileType.INSTANCE, (CharSequence)string2);
|
||
lightVirtualFile2.setWritable(false);
|
||
DocumentContentImpl documentContentImpl2 = new DocumentContentImpl(project, (Document)new DocumentImpl(string2), (FileType)XmlFileType.INSTANCE, (VirtualFile)lightVirtualFile2, null, null, null);
|
||
Document document = FileDocumentManager.getInstance().getDocument(virtualFile);
|
||
DocumentContentImpl documentContentImpl3 = new DocumentContentImpl(project, document, (FileType)XmlFileType.INSTANCE, virtualFile, null, null, null);
|
||
d d2 = new d(project, (DocumentContent)documentContentImpl3, string3, Lists.newArrayList((Object[])new DocumentContent[]{documentContentImpl, documentContentImpl3, documentContentImpl2}), "merge result", Lists.newArrayList((Object[])new String[]{"origin", "result", "new source"}));
|
||
DiffManager.getInstance().showMerge(project, (MergeRequest)d2);
|
||
PsiDocumentManager.getInstance((Project)project).doPostponedOperationsAndUnblockDocument(document);
|
||
FileDocumentManager.getInstance().saveDocument(document);
|
||
return document.getText();
|
||
}
|
||
|
||
@NotNull
|
||
private static String e(String string, PsiClass psiClass, Project project) {
|
||
VirtualFile virtualFile = psiClass.getContainingFile().getVirtualFile();
|
||
String string2 = string.replace("\r\n", "\n");
|
||
LightVirtualFile lightVirtualFile = new LightVirtualFile("ss.java", (FileType)JavaFileType.INSTANCE, (CharSequence)string2);
|
||
lightVirtualFile.setWritable(false);
|
||
DocumentContentImpl documentContentImpl = new DocumentContentImpl(project, (Document)new DocumentImpl(string2), (FileType)JavaFileType.INSTANCE, (VirtualFile)lightVirtualFile, null, null, null);
|
||
Document document = FileDocumentManager.getInstance().getDocument(virtualFile);
|
||
SimpleDiffRequest simpleDiffRequest = new SimpleDiffRequest("merge into originFile", (DiffContent)new DocumentContentImpl(project, document, (FileType)JavaFileType.INSTANCE, virtualFile, null, null, null), (DiffContent)documentContentImpl, "origin file(final result)", "new source");
|
||
DiffManager.getInstance().showDiff(project, (DiffRequest)simpleDiffRequest);
|
||
PsiDocumentManager.getInstance((Project)project).doPostponedOperationsAndUnblockDocument(document);
|
||
FileDocumentManager.getInstance().saveDocument(document);
|
||
return document.getText();
|
||
}
|
||
|
||
private static boolean a(PsiMethod psiMethod, PsiClass psiClass) {
|
||
boolean bl = psiMethod.hasModifierProperty("static");
|
||
String string = psiMethod.getName();
|
||
if (bl && string.equals("builder")) {
|
||
return false;
|
||
}
|
||
if (bl) {
|
||
return true;
|
||
}
|
||
if (string.startsWith("get") || string.startsWith("set") || string.startsWith("is")) {
|
||
String string2 = s_0.java_lang_String_a(string);
|
||
PsiField psiField = psiClass.findFieldByName(string2, false);
|
||
return psiField != null && psiField.hasModifierProperty("transient");
|
||
}
|
||
if (psiMethod.isConstructor()) {
|
||
return false;
|
||
}
|
||
return !string.equals("toString") && !string.equals("equals") && !string.equals("hashCode") && !string.equals("clone") && !string.equals("canEqual");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.d;
|
||
|
||
public class c {
|
||
public static String a = "useJakartaValidationAnnotations";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.diff.contents.DocumentContent
|
||
* com.intellij.diff.merge.MergeResult
|
||
* com.intellij.diff.merge.TextMergeRequest
|
||
* com.intellij.diff.util.DiffUtil
|
||
* com.intellij.diff.util.ThreeSide
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.text.StringUtil
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.d;
|
||
|
||
import com.intellij.diff.contents.DocumentContent;
|
||
import com.intellij.diff.merge.MergeResult;
|
||
import com.intellij.diff.merge.TextMergeRequest;
|
||
import com.intellij.diff.util.DiffUtil;
|
||
import com.intellij.diff.util.ThreeSide;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.text.StringUtil;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d
|
||
extends TextMergeRequest {
|
||
@Nullable
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
@NotNull
|
||
private final DocumentContent var_com_intellij_diff_contents_DocumentContent_a;
|
||
@NotNull
|
||
private final List<DocumentContent> var_java_util_List_com_intellij_diff_contents_DocumentContent__a;
|
||
@NotNull
|
||
private final CharSequence var_java_lang_CharSequence_a;
|
||
@Nullable
|
||
private final String var_java_lang_String_a;
|
||
@NotNull
|
||
private final List<String> b;
|
||
static final /* synthetic */ boolean var_boolean_a;
|
||
|
||
public d(@Nullable Project project, @NotNull DocumentContent documentContent, @NotNull CharSequence charSequence, @NotNull List<DocumentContent> list, @Nullable String string, @NotNull List<String> list2) {
|
||
if (!var_boolean_a && list.size() != 3) {
|
||
throw new AssertionError();
|
||
}
|
||
if (!var_boolean_a && list2.size() != 3) {
|
||
throw new AssertionError();
|
||
}
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_diff_contents_DocumentContent_a = documentContent;
|
||
this.var_java_lang_CharSequence_a = charSequence;
|
||
this.var_com_intellij_openapi_project_Project_a = list;
|
||
this.b = list2;
|
||
this.var_java_lang_String_a = string;
|
||
this.onAssigned(true);
|
||
}
|
||
|
||
@NotNull
|
||
public DocumentContent getOutputContent() {
|
||
DocumentContent documentContent = this.var_com_intellij_diff_contents_DocumentContent_a;
|
||
return documentContent;
|
||
}
|
||
|
||
@NotNull
|
||
public List<DocumentContent> getContents() {
|
||
Project project = this.var_com_intellij_openapi_project_Project_a;
|
||
return project;
|
||
}
|
||
|
||
@Nullable
|
||
public String getTitle() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
@NotNull
|
||
public List<String> getContentTitles() {
|
||
List<String> list = this.b;
|
||
return list;
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
*/
|
||
public void applyResult(@NotNull MergeResult mergeResult) {
|
||
try {
|
||
CharSequence charSequence = switch (mergeResult) {
|
||
case MergeResult.CANCEL -> this.var_java_lang_CharSequence_a;
|
||
case MergeResult.LEFT -> {
|
||
CharSequence var3_3 = ((DocumentContent)ThreeSide.LEFT.select(this.getContents())).getDocument().getImmutableCharSequence();
|
||
yield StringUtil.convertLineSeparators((String)var3_3.toString());
|
||
}
|
||
case MergeResult.RIGHT -> {
|
||
CharSequence var4_4 = ((DocumentContent)ThreeSide.RIGHT.select(this.getContents())).getDocument().getImmutableCharSequence();
|
||
yield StringUtil.convertLineSeparators((String)var4_4.toString());
|
||
}
|
||
case MergeResult.RESOLVED -> null;
|
||
default -> throw new IllegalArgumentException(mergeResult.toString());
|
||
};
|
||
if (charSequence != null) {
|
||
DiffUtil.executeWriteCommand((Document)this.var_com_intellij_diff_contents_DocumentContent_a.getDocument(), (Project)this.var_com_intellij_openapi_project_Project_a, (String)null, () -> this.var_com_intellij_diff_contents_DocumentContent_a.getDocument().setText((CharSequence)charSequence.toString()));
|
||
}
|
||
}
|
||
finally {
|
||
this.onAssigned(false);
|
||
}
|
||
}
|
||
|
||
public void onAssigned(boolean bl) {
|
||
this.var_com_intellij_diff_contents_DocumentContent_a.onAssigned(bl);
|
||
for (DocumentContent documentContent : this.var_com_intellij_openapi_project_Project_a) {
|
||
documentContent.onAssigned(bl);
|
||
}
|
||
}
|
||
|
||
static {
|
||
var_boolean_a = !d.class.desiredAssertionStatus();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.velocity.VelocityContext
|
||
* org.apache.velocity.app.VelocityEngine
|
||
* org.apache.velocity.context.Context
|
||
*/
|
||
package com.ccnode.codegenerator.mybatisGenerator.d;
|
||
|
||
import java.io.PrintWriter;
|
||
import java.io.StringWriter;
|
||
import java.io.Writer;
|
||
import java.util.Map;
|
||
import java.util.Properties;
|
||
import org.apache.velocity.VelocityContext;
|
||
import org.apache.velocity.app.VelocityEngine;
|
||
import org.apache.velocity.context.Context;
|
||
|
||
public class e {
|
||
private static final Properties a = new Properties();
|
||
|
||
private e() {
|
||
throw new UnsupportedOperationException();
|
||
}
|
||
|
||
public static String a(String string, Map<String, Object> map) {
|
||
VelocityEngine velocityEngine = new VelocityEngine(a);
|
||
VelocityContext velocityContext = new VelocityContext();
|
||
if (map != null) {
|
||
map.forEach((arg_0, arg_1) -> ((VelocityContext)velocityContext).put(arg_0, arg_1));
|
||
}
|
||
StringWriter stringWriter = new StringWriter();
|
||
try {
|
||
velocityEngine.evaluate((Context)velocityContext, (Writer)stringWriter, "Velocity Code Generate", string);
|
||
}
|
||
catch (Exception exception) {
|
||
StringBuilder stringBuilder = new StringBuilder("<22><><D4><DA><C9>ɴ<B3><C9B4><FA>ʱ<EB><CAB1>ģ<AC>巢<B0><E5B7A2><C9><FA><C1><CB><C8><E7><CF><D3><EFB7A8><B4><ED><CE><F3>\n");
|
||
StringWriter stringWriter2 = new StringWriter();
|
||
exception.printStackTrace(new PrintWriter(stringWriter2));
|
||
stringBuilder.append(stringWriter2.toString());
|
||
return stringBuilder.toString().replace("\r", "");
|
||
}
|
||
String string2 = stringWriter.toString();
|
||
StringBuilder stringBuilder = new StringBuilder(string2);
|
||
while (stringBuilder.length() > 0 && Character.isWhitespace(stringBuilder.charAt(0))) {
|
||
stringBuilder.deleteCharAt(0);
|
||
}
|
||
return stringBuilder.toString();
|
||
}
|
||
|
||
static {
|
||
a.setProperty("runtime.log.logsystem.log4j.logger", "velocity");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.psi.tree.IFileElementType
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
import com.ccnode.codegenerator.K.f;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.psi.tree.IFileElementType;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.K.b
|
||
*/
|
||
public class b_0 {
|
||
public static final IFileElementType a = new IFileElementType((Language)f.a);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
*/
|
||
package com.ccnode.codegenerator.K;
|
||
|
||
import com.intellij.lang.Language;
|
||
|
||
public class f
|
||
extends Language {
|
||
public static final f a = new f();
|
||
|
||
protected f() {
|
||
super("Mybatis");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.lang.ParserDefinition
|
||
* com.intellij.lang.ParserDefinition$SpaceRequirements
|
||
* com.intellij.lang.PsiParser
|
||
* com.intellij.lexer.Lexer
|
||
* com.intellij.lexer.XmlLexer
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.FileViewProvider
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.impl.source.parsing.xml.XmlParser
|
||
* com.intellij.psi.impl.source.xml.XmlFileImpl
|
||
* com.intellij.psi.tree.IElementType
|
||
* com.intellij.psi.tree.IFileElementType
|
||
* com.intellij.psi.tree.TokenSet
|
||
* com.intellij.psi.util.PsiUtilCore
|
||
* com.intellij.psi.xml.XmlTokenType
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.k;
|
||
|
||
import com.ccnode.codegenerator.k.b_0;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.lang.ParserDefinition;
|
||
import com.intellij.lang.PsiParser;
|
||
import com.intellij.lexer.Lexer;
|
||
import com.intellij.lexer.XmlLexer;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.FileViewProvider;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.impl.source.parsing.xml.XmlParser;
|
||
import com.intellij.psi.impl.source.xml.XmlFileImpl;
|
||
import com.intellij.psi.tree.IElementType;
|
||
import com.intellij.psi.tree.IFileElementType;
|
||
import com.intellij.psi.tree.TokenSet;
|
||
import com.intellij.psi.util.PsiUtilCore;
|
||
import com.intellij.psi.xml.XmlTokenType;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.K.g
|
||
*/
|
||
public class g_0
|
||
implements ParserDefinition {
|
||
@NotNull
|
||
public Lexer createLexer(Project project) {
|
||
return new XmlLexer();
|
||
}
|
||
|
||
public IFileElementType getFileNodeType() {
|
||
return b_0.a;
|
||
}
|
||
|
||
@NotNull
|
||
public TokenSet getWhitespaceTokens() {
|
||
return XmlTokenType.WHITESPACES;
|
||
}
|
||
|
||
@NotNull
|
||
public TokenSet getCommentTokens() {
|
||
return XmlTokenType.COMMENTS;
|
||
}
|
||
|
||
@NotNull
|
||
public TokenSet getStringLiteralElements() {
|
||
return TokenSet.EMPTY;
|
||
}
|
||
|
||
@NotNull
|
||
public PsiParser createParser(Project project) {
|
||
return new XmlParser();
|
||
}
|
||
|
||
@NotNull
|
||
public PsiElement createElement(ASTNode aSTNode) {
|
||
return PsiUtilCore.NULL_PSI_ELEMENT;
|
||
}
|
||
|
||
public PsiFile createFile(FileViewProvider fileViewProvider) {
|
||
return new XmlFileImpl(fileViewProvider, (IElementType)b_0.a);
|
||
}
|
||
|
||
public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode aSTNode, ASTNode aSTNode2) {
|
||
Lexer lexer = this.createLexer(aSTNode.getPsi().getProject());
|
||
return g_0.a(aSTNode, aSTNode2, lexer, 0);
|
||
}
|
||
|
||
public static ParserDefinition.SpaceRequirements a(ASTNode aSTNode, ASTNode aSTNode2, Lexer lexer, int n2) {
|
||
if (aSTNode.getElementType() == XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN || aSTNode2.getElementType() == XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN) {
|
||
return ParserDefinition.SpaceRequirements.MUST_NOT;
|
||
}
|
||
if (aSTNode.getElementType() == XmlTokenType.XML_ATTRIBUTE_VALUE_END_DELIMITER && aSTNode2.getElementType() == XmlTokenType.XML_NAME) {
|
||
return ParserDefinition.SpaceRequirements.MUST;
|
||
}
|
||
if (aSTNode.getElementType() == XmlTokenType.XML_NAME && aSTNode2.getElementType() == XmlTokenType.XML_NAME) {
|
||
return ParserDefinition.SpaceRequirements.MUST;
|
||
}
|
||
if (aSTNode.getElementType() == XmlTokenType.XML_TAG_NAME && aSTNode2.getElementType() == XmlTokenType.XML_NAME) {
|
||
return ParserDefinition.SpaceRequirements.MUST;
|
||
}
|
||
return ParserDefinition.SpaceRequirements.MAY;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.InjectedLanguagePlaces
|
||
* com.intellij.psi.LanguageInjector
|
||
* com.intellij.psi.PsiLanguageInjectionHost
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.K;
|
||
|
||
import com.intellij.psi.InjectedLanguagePlaces;
|
||
import com.intellij.psi.LanguageInjector;
|
||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class h
|
||
implements LanguageInjector {
|
||
public void getLanguagesToInject(@NotNull PsiLanguageInjectionHost psiLanguageInjectionHost, @NotNull InjectedLanguagePlaces injectedLanguagePlaces) {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.ccnode.codegenerator.L.b
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.intellij.database.intentions.RunQueryInConsoleIntentionAction
|
||
* com.intellij.database.psi.DbPsiFacade
|
||
* com.intellij.database.script.PersistenceConsoleProvider
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.actionSystem.ActionGroup
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.editor.CaretModel
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.event.DocumentEvent
|
||
* com.intellij.openapi.editor.event.DocumentListener
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.fileEditor.FileDocumentManager
|
||
* com.intellij.openapi.fileEditor.FileEditorManager
|
||
* com.intellij.openapi.fileEditor.OpenFileDescriptor
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.ide.CopyPasteManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.DialogWrapper$IdeModalityType
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.ui.VerticalFlowLayout
|
||
* com.intellij.openapi.util.Pair
|
||
* com.intellij.openapi.vfs.LocalFileSystem
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.openapi.wm.ToolWindow
|
||
* com.intellij.openapi.wm.ToolWindowManager
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.psi.PsiManager
|
||
* com.intellij.psi.util.PsiTreeUtil
|
||
* com.intellij.psi.xml.XmlTag
|
||
* com.intellij.ui.EditorTextField
|
||
* com.intellij.ui.TextFieldWithAutoCompletion
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.util.containers.ContainerUtil
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.apache.commons.lang3.math.NumberUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import com.ccnode.codegenerator.O.u;
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.i_0;
|
||
import com.ccnode.codegenerator.ad.w_0;
|
||
import com.ccnode.codegenerator.g.b;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.intellij.database.intentions.RunQueryInConsoleIntentionAction;
|
||
import com.intellij.database.psi.DbPsiFacade;
|
||
import com.intellij.database.script.PersistenceConsoleProvider;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.lang.a.c;
|
||
import com.intellij.lang.a.g.r;
|
||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.editor.CaretModel;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.event.DocumentEvent;
|
||
import com.intellij.openapi.editor.event.DocumentListener;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.ide.CopyPasteManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||
import com.intellij.openapi.util.Pair;
|
||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.openapi.wm.ToolWindow;
|
||
import com.intellij.openapi.wm.ToolWindowManager;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.psi.PsiManager;
|
||
import com.intellij.psi.util.PsiTreeUtil;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
import com.intellij.ui.EditorTextField;
|
||
import com.intellij.ui.TextFieldWithAutoCompletion;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.util.containers.ContainerUtil;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Container;
|
||
import java.awt.Dimension;
|
||
import java.awt.FlowLayout;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.awt.datatransfer.Transferable;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.io.File;
|
||
import java.io.IOException;
|
||
import java.text.SimpleDateFormat;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.Iterator;
|
||
import java.util.LinkedHashSet;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.Set;
|
||
import java.util.function.BiConsumer;
|
||
import javax.swing.AbstractAction;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.Action;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JSplitPane;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.apache.commons.lang3.math.NumberUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.L.b
|
||
*/
|
||
public class b_0
|
||
extends DialogWrapper {
|
||
private final AbstractAction var_javax_swing_AbstractAction_a = Maps.newLinkedHashMap();
|
||
private final AbstractAction var_javax_swing_AbstractAction_b = Maps.newHashMap();
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private JPanel d;
|
||
public JSplitPane var_javax_swing_JSplitPane_a;
|
||
private XmlTag var_com_intellij_psi_xml_XmlTag_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private Set<String> var_java_util_Set_java_lang_String__a;
|
||
private Set<String> var_java_util_Set_java_lang_String__b;
|
||
private Document var_com_intellij_openapi_editor_Document_a;
|
||
private PsiFile var_com_intellij_psi_PsiFile_a;
|
||
private Boolean var_java_lang_Boolean_a = false;
|
||
private String var_java_lang_String_a;
|
||
private boolean var_boolean_a = false;
|
||
private Map<String, Boolean> var_java_util_Map_java_lang_String,_java_lang_Boolean__a;
|
||
private Map<String, String> var_java_util_Map_java_lang_String,_java_lang_String__b;
|
||
private List<JCheckBox> var_java_util_List_javax_swing_JCheckBox__a;
|
||
private Map<String, JCheckBox> var_java_util_Map_java_lang_String,_javax_swing_JCheckBox__c;
|
||
private boolean var_boolean_b;
|
||
|
||
public b_0(Project project, XmlTag xmlTag, boolean bl) {
|
||
super(project, true, DialogWrapper.IdeModalityType.MODELESS);
|
||
Object object;
|
||
String string;
|
||
Object object2;
|
||
this.var_javax_swing_AbstractAction_a = Lists.newArrayList();
|
||
this.var_javax_swing_JPanel_c = Maps.newHashMap();
|
||
this.var_boolean_b = com.ccnode.codegenerator.g.b.a();
|
||
this.var_com_intellij_psi_xml_XmlTag_a = xmlTag;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_boolean_a = bl;
|
||
LinkedHashSet<String> linkedHashSet = w_0.a.a(this.var_com_intellij_psi_xml_XmlTag_a);
|
||
this.var_javax_swing_AbstractAction_a = linkedHashSet;
|
||
Object object3 = this.var_javax_swing_AbstractAction_a.iterator();
|
||
while (object3.hasNext()) {
|
||
object2 = (String)object3.next();
|
||
this.var_javax_swing_AbstractAction_a.put(object2, true);
|
||
}
|
||
this.var_javax_swing_AbstractAction_b = object3 = w_0.a.b(this.var_com_intellij_psi_xml_XmlTag_a);
|
||
object2 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(xmlTag);
|
||
DefaultActionGroup defaultActionGroup = this.var_javax_swing_AbstractAction_b.iterator();
|
||
while (defaultActionGroup.hasNext()) {
|
||
string = (String)defaultActionGroup.next();
|
||
object = (String)object2.get(string);
|
||
if (object != null) {
|
||
this.var_javax_swing_AbstractAction_b.put(string, object);
|
||
continue;
|
||
}
|
||
this.var_javax_swing_AbstractAction_b.put(string, "");
|
||
}
|
||
this.var_javax_swing_AbstractAction_a = new AbstractAction(this, "Open sql in file"){
|
||
final /* synthetic */ b_0 a;
|
||
{
|
||
this.a = b_02;
|
||
super(string);
|
||
}
|
||
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = this.a.var_com_intellij_ui_EditorTextField_a.getText();
|
||
this.a.a(string);
|
||
}
|
||
};
|
||
this.var_javax_swing_AbstractAction_b = new AbstractAction(this, A.a("setIfTestvalueByParamVaule"), project){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_l_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_b_0_a = b_02;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
super(string);
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
HashMap hashMap = Maps.newHashMap();
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_b.forEach(new BiConsumer<String, String>(){
|
||
final /* synthetic */ Map var_java_util_Map_a;
|
||
final /* synthetic */ 4 var_com_ccnode_codegenerator_L_b$4_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_L_b$4_a = var1_1;
|
||
this.var_java_util_Map_a = map;
|
||
}
|
||
|
||
public void a(String string, String string2) {
|
||
String string3;
|
||
u u2;
|
||
String string4;
|
||
if (string.startsWith("#{") && string.endsWith("}") && StringUtils.isNotBlank((CharSequence)(string4 = (String)(u2 = new u(string3 = string.substring(2, string.length() - 1))).get("property")))) {
|
||
Object object = null;
|
||
if (string2.equals("null")) {
|
||
object = null;
|
||
} else if (string2.startsWith("'") && string2.endsWith("'")) {
|
||
object = string2.substring(1, string2.length() - 1);
|
||
} else if (NumberUtils.isCreatable((String)string2)) {
|
||
try {
|
||
object = Integer.valueOf(string2);
|
||
}
|
||
catch (Exception exception) {}
|
||
} else if (StringUtils.isNotBlank((CharSequence)string2)) {
|
||
object = "unknown";
|
||
}
|
||
if (string4.contains(".")) {
|
||
string4 = string4.replace(".", "uu__uu");
|
||
}
|
||
this.var_java_util_Map_a.put(string4, object);
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (String)object2);
|
||
}
|
||
});
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
HashMap hashMap2 = Maps.newHashMap();
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_a.forEach(new BiConsumer<String, Boolean>(){
|
||
final /* synthetic */ Map var_java_util_Map_a;
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ Map b;
|
||
final /* synthetic */ 4 var_com_ccnode_codegenerator_L_b$4_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_L_b$4_a = var1_1;
|
||
this.var_java_util_Map_a = map;
|
||
this.var_java_util_List_a = list;
|
||
this.b = map2;
|
||
}
|
||
|
||
public void a(String string, Boolean bl) {
|
||
try {
|
||
Object object;
|
||
String string2 = string;
|
||
PsiFile psiFile = PsiFileFactory.getInstance((Project)this.var_com_ccnode_codegenerator_L_b$4_a.var_com_intellij_openapi_project_Project_a).createFileFromText("my", (FileType)com.intellij.lang.a.c.a, (CharSequence)("%{" + string + "}"));
|
||
if (psiFile instanceof com.intellij.lang.a.b) {
|
||
object = (com.intellij.lang.a.b)psiFile;
|
||
Collection collection = PsiTreeUtil.findChildrenOfType((PsiElement)object, r.class);
|
||
for (r r2 : collection) {
|
||
String string3 = r2.getText();
|
||
if (!string3.contains(".") || !this.var_java_util_Map_a.containsKey(string3 = string3.replace(".", "uu__uu"))) continue;
|
||
String string4 = string3 + "!=null";
|
||
PsiFile psiFile2 = PsiFileFactory.getInstance((Project)this.var_com_ccnode_codegenerator_L_b$4_a.var_com_intellij_openapi_project_Project_a).createFileFromText("my", (FileType)com.intellij.lang.a.c.a, (CharSequence)("%{" + string4 + "}"));
|
||
r r3 = (r)PsiTreeUtil.findChildOfType((PsiElement)psiFile2, r.class);
|
||
r2.replace((PsiElement)r3);
|
||
}
|
||
String string5 = psiFile.getText();
|
||
if (string5.contains("%{") && string5.contains("}")) {
|
||
string = string5.substring(string5.indexOf("%{") + "%{".length(), string5.indexOf("}"));
|
||
}
|
||
}
|
||
object = com.ccnode.codegenerator.n.d_0.a(this.var_java_util_Map_a, string);
|
||
this.var_java_util_List_a.add(string2 + "-->" + (Boolean)object);
|
||
this.b.put(string2, object);
|
||
}
|
||
catch (Exception exception) {
|
||
exception.printStackTrace();
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (Boolean)object2);
|
||
}
|
||
});
|
||
String string = Joiner.on((String)"\n").join((Iterable)arrayList);
|
||
int n2 = Messages.showOkCancelDialog((String)string, (String)"Set if test value by param value", null);
|
||
if (n2 == 0) {
|
||
hashMap2.forEach(new BiConsumer<String, Boolean>(){
|
||
|
||
public void a(String string, Boolean bl) {
|
||
var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_a.put(string, bl);
|
||
JCheckBox jCheckBox = (JCheckBox)var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_JPanel_c.get(string);
|
||
if (jCheckBox != null) {
|
||
jCheckBox.setSelected(bl);
|
||
}
|
||
var_com_ccnode_codegenerator_l_b_0_a.c();
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (Boolean)object2);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
};
|
||
this.d();
|
||
this.d.setLayout(new BorderLayout());
|
||
defaultActionGroup = new DefaultActionGroup("MybatisCodeHelper.MybatisRunner", false);
|
||
defaultActionGroup.add((AnAction)new a(this));
|
||
string = ActionManager.getInstance().createActionToolbar("MybatisRunnerActions", (ActionGroup)defaultActionGroup, true);
|
||
string.setLayoutPolicy(2);
|
||
object = string.getComponent();
|
||
((JComponent)object).setBorder(null);
|
||
((JComponent)object).setOpaque(false);
|
||
this.d.add((Component)object, "Center");
|
||
JPanel jPanel = new JPanel(new FlowLayout());
|
||
JButton jButton = new JButton("All if test true");
|
||
jPanel.add(jButton);
|
||
JButton jButton2 = new JButton("All if test false");
|
||
jPanel.add(jButton2);
|
||
jPanel.add((Component)LinkLabel.create((String)A.a("useGenerateTestcase"), (Runnable)new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/quicktestsql");
|
||
}
|
||
}));
|
||
this.d.add((Component)jPanel, "East");
|
||
jButton.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
Object object;
|
||
Iterator iterator = b_0.this.var_javax_swing_AbstractAction_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
object = (JCheckBox)iterator.next();
|
||
((AbstractButton)object).setSelected(true);
|
||
}
|
||
iterator = b_0.this.var_javax_swing_AbstractAction_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
object = (String)iterator.next();
|
||
b_0.this.var_javax_swing_AbstractAction_a.put(object, true);
|
||
}
|
||
b_0.this.c();
|
||
}
|
||
});
|
||
jButton2.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
Object object;
|
||
Iterator iterator = b_0.this.var_javax_swing_AbstractAction_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
object = (JCheckBox)iterator.next();
|
||
((AbstractButton)object).setSelected(false);
|
||
}
|
||
iterator = b_0.this.var_javax_swing_AbstractAction_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
object = (String)iterator.next();
|
||
b_0.this.var_javax_swing_AbstractAction_a.put(object, false);
|
||
}
|
||
b_0.this.c();
|
||
}
|
||
});
|
||
this.setTitle("test for mybatis xml");
|
||
if (this.var_boolean_b) {
|
||
this.setOKButtonText("Execute sql");
|
||
} else {
|
||
this.setOKButtonText("Copy sql");
|
||
}
|
||
this.init();
|
||
}
|
||
|
||
private void a(String string) {
|
||
Pair<Language, FileType> pair = com.ccnode.codegenerator.g.b.a();
|
||
PsiFile psiFile = this.var_com_intellij_psi_xml_XmlTag_a.getContainingFile();
|
||
String string2 = "";
|
||
string2 = psiFile != null ? psiFile.getName() : "Default.xml";
|
||
int n2 = string2.lastIndexOf(".");
|
||
if (n2 != -1) {
|
||
string2 = string2.substring(0, n2);
|
||
}
|
||
File file = new File(System.getProperty("java.io.tmpdir"), "mybatisCodeHelper_" + this.var_com_intellij_openapi_project_Project_a.getName() + "_" + string2 + "." + ((FileType)pair.getSecond()).getDefaultExtension());
|
||
try {
|
||
PsiFile psiFile2;
|
||
VirtualFile virtualFile;
|
||
if (!file.exists()) {
|
||
file.createNewFile();
|
||
}
|
||
if ((virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file)) != null && (psiFile2 = PsiManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).findFile(virtualFile)) != null) {
|
||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a);
|
||
Document document = psiDocumentManager.getDocument(psiFile2);
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, (Runnable)new Runnable(){
|
||
final /* synthetic */ Document var_com_intellij_openapi_editor_Document_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ PsiDocumentManager var_com_intellij_psi_PsiDocumentManager_a;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_l_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_b_0_a = b_02;
|
||
this.var_com_intellij_openapi_editor_Document_a = document;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_intellij_psi_PsiDocumentManager_a = psiDocumentManager;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
if (this.var_com_intellij_openapi_editor_Document_a != null) {
|
||
this.var_com_intellij_openapi_editor_Document_a.insertString(this.var_com_intellij_openapi_editor_Document_a.getTextLength(), (CharSequence)("\n\n" + this.var_java_lang_String_a));
|
||
FileDocumentManager.getInstance().saveDocument(this.var_com_intellij_openapi_editor_Document_a);
|
||
this.var_com_intellij_psi_PsiDocumentManager_a.commitDocument(this.var_com_intellij_openapi_editor_Document_a);
|
||
}
|
||
}
|
||
});
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, (Runnable)new Runnable(){
|
||
final /* synthetic */ VirtualFile var_com_intellij_openapi_vfs_VirtualFile_a;
|
||
final /* synthetic */ Document var_com_intellij_openapi_editor_Document_a;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_l_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_b_0_a = b_02;
|
||
this.var_com_intellij_openapi_vfs_VirtualFile_a = virtualFile;
|
||
this.var_com_intellij_openapi_editor_Document_a = document;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
OpenFileDescriptor openFileDescriptor = new OpenFileDescriptor(this.var_com_ccnode_codegenerator_l_b_0_a.var_com_intellij_openapi_project_Project_a, this.var_com_intellij_openapi_vfs_VirtualFile_a, this.var_com_intellij_openapi_editor_Document_a.getTextLength());
|
||
Editor editor = FileEditorManager.getInstance((Project)this.var_com_ccnode_codegenerator_l_b_0_a.var_com_intellij_openapi_project_Project_a).openTextEditor(openFileDescriptor, true);
|
||
if (editor != null) {
|
||
CaretModel caretModel = editor.getCaretModel();
|
||
if (caretModel != null) {
|
||
caretModel.moveToOffset(this.var_com_intellij_openapi_editor_Document_a.getTextLength() - 2);
|
||
}
|
||
PsiFile psiFile = PsiDocumentManager.getInstance((Project)this.var_com_ccnode_codegenerator_l_b_0_a.var_com_intellij_openapi_project_Project_a).getPsiFile(this.var_com_intellij_openapi_editor_Document_a);
|
||
ArrayList arrayList = ContainerUtil.newArrayList();
|
||
for (PersistenceConsoleProvider persistenceConsoleProvider : (PersistenceConsoleProvider[])PersistenceConsoleProvider.EP_NAME.getExtensions()) {
|
||
arrayList.addAll(persistenceConsoleProvider.getRunners((PsiElement)psiFile, editor));
|
||
}
|
||
RunQueryInConsoleIntentionAction.chooseAndRunRunners((List)arrayList, (Editor)editor, (AnActionEvent)null);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
catch (IOException iOException) {
|
||
throw new RuntimeException(iOException);
|
||
}
|
||
}
|
||
|
||
@NotNull
|
||
protected Action[] createLeftSideActions() {
|
||
Action[] actionArray = new Action[]{this.var_javax_swing_AbstractAction_a, this.var_javax_swing_AbstractAction_b};
|
||
return actionArray;
|
||
}
|
||
|
||
public Boolean java_lang_Boolean_a() {
|
||
return this.var_java_lang_Boolean_a;
|
||
}
|
||
|
||
public void a(Boolean bl) {
|
||
this.var_java_lang_Boolean_a = bl;
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
private void void_a() {
|
||
Document document;
|
||
PsiFile psiFile;
|
||
String string = this.java_lang_String_b();
|
||
Pair<Language, FileType> pair = com.ccnode.codegenerator.g.b.a();
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile = PsiFileFactory.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).createFileFromText("mybatis.sql", (Language)pair.getFirst(), (CharSequence)string);
|
||
this.var_com_intellij_openapi_editor_Document_a = document = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDocument(psiFile);
|
||
this.var_com_intellij_ui_EditorTextField_a = new EditorTextField(document, this.var_com_intellij_openapi_project_Project_a, (FileType)pair.second){
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
editorEx.getSettings().setTabSize(4);
|
||
editorEx.getSettings().setLineNumbersShown(true);
|
||
return editorEx;
|
||
}
|
||
};
|
||
this.var_com_intellij_ui_EditorTextField_a.setOneLineMode(false);
|
||
this.var_com_intellij_ui_EditorTextField_a.setAutoscrolls(true);
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.void_b();
|
||
}
|
||
|
||
private void void_b() {
|
||
Object object;
|
||
Object object2;
|
||
Object object3;
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new VerticalFlowLayout());
|
||
this.var_javax_swing_AbstractAction_a.clear();
|
||
this.var_javax_swing_JPanel_c.clear();
|
||
Object object4 = this.var_javax_swing_AbstractAction_a.iterator();
|
||
while (object4.hasNext()) {
|
||
object3 = (String)object4.next();
|
||
object2 = new JPanel();
|
||
object = new JCheckBox("[test:" + (String)object3 + "] ==true", true);
|
||
if (this.var_javax_swing_AbstractAction_a.containsKey(object3) && this.var_javax_swing_AbstractAction_a.get(object3) != null) {
|
||
((AbstractButton)object).setSelected((Boolean)this.var_javax_swing_AbstractAction_a.get(object3));
|
||
}
|
||
this.var_javax_swing_AbstractAction_a.add(object);
|
||
this.var_javax_swing_JPanel_c.put(object3, object);
|
||
((Container)object2).add((Component)object);
|
||
((AbstractButton)object).addActionListener(new ActionListener(){
|
||
final /* synthetic */ JCheckBox var_javax_swing_JCheckBox_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_l_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_b_0_a = b_02;
|
||
this.var_javax_swing_JCheckBox_a = jCheckBox;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
if (this.var_javax_swing_JCheckBox_a.isSelected()) {
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_a.put(this.var_java_lang_String_a, true);
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_a.put(this.var_java_lang_String_a, false);
|
||
}
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.c();
|
||
}
|
||
});
|
||
this.var_javax_swing_JPanel_a.add((Component)object2);
|
||
}
|
||
object4 = Lists.newArrayList();
|
||
object4.add("''");
|
||
object4.add("null");
|
||
object4.add("100");
|
||
object3 = new Date();
|
||
object2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date)object3);
|
||
object4.add("'" + (String)object2 + "'");
|
||
object = new SimpleDateFormat("yyyy-MM-dd").format((Date)object3);
|
||
object4.add("'" + (String)object + "'");
|
||
object4.add("'" + (String)object + " 00:00:00'");
|
||
object4.add("'" + (String)object + " 23:59:59'");
|
||
object4.add("now()");
|
||
Iterator iterator = this.var_javax_swing_AbstractAction_b.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
JPanel jPanel = new JPanel();
|
||
JLabel jLabel = new JLabel(string);
|
||
jPanel.add(jLabel);
|
||
TextFieldWithAutoCompletion textFieldWithAutoCompletion = TextFieldWithAutoCompletion.create((Project)this.var_com_intellij_openapi_project_Project_a, (Collection)object4, (boolean)true, (String)"");
|
||
textFieldWithAutoCompletion.setPreferredWidth(200);
|
||
jPanel.add((Component)textFieldWithAutoCompletion);
|
||
String string2 = (String)this.var_javax_swing_AbstractAction_b.get(string);
|
||
if (StringUtils.isNotBlank((CharSequence)string2)) {
|
||
textFieldWithAutoCompletion.setText(string2);
|
||
}
|
||
textFieldWithAutoCompletion.getDocument().addDocumentListener(new DocumentListener(){
|
||
final /* synthetic */ TextFieldWithAutoCompletion var_com_intellij_ui_TextFieldWithAutoCompletion_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_l_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_b_0_a = b_02;
|
||
this.var_com_intellij_ui_TextFieldWithAutoCompletion_a = textFieldWithAutoCompletion;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public void documentChanged(@NotNull DocumentEvent documentEvent) {
|
||
this.a();
|
||
}
|
||
|
||
public void a() {
|
||
String string = this.var_com_intellij_ui_TextFieldWithAutoCompletion_a.getText();
|
||
if (StringUtils.isNotBlank((CharSequence)string)) {
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_b.put(this.var_java_lang_String_a, string);
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.var_javax_swing_AbstractAction_b.put(this.var_java_lang_String_a, "");
|
||
}
|
||
this.var_com_ccnode_codegenerator_l_b_0_a.c();
|
||
}
|
||
});
|
||
this.var_javax_swing_JPanel_a.add(jPanel);
|
||
}
|
||
}
|
||
|
||
private void c() {
|
||
String string = this.java_lang_String_b();
|
||
ApplicationManager.getApplication().invokeLater(() -> this.b(string));
|
||
}
|
||
|
||
private void b(String string) {
|
||
Document document;
|
||
PsiFile psiFile;
|
||
this.var_javax_swing_JPanel_c.removeAll();
|
||
Pair<Language, FileType> pair = com.ccnode.codegenerator.g.b.a();
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile = PsiFileFactory.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).createFileFromText("mybatis.sql", (Language)pair.getFirst(), (CharSequence)string);
|
||
this.var_com_intellij_openapi_editor_Document_a = document = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDocument(psiFile);
|
||
this.var_com_intellij_ui_EditorTextField_a = new EditorTextField(document, this.var_com_intellij_openapi_project_Project_a, (FileType)pair.getSecond()){
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
return editorEx;
|
||
}
|
||
};
|
||
this.var_com_intellij_ui_EditorTextField_a.setOneLineMode(false);
|
||
this.var_com_intellij_ui_EditorTextField_a.setAutoscrolls(true);
|
||
this.var_javax_swing_JPanel_c.add((Component)this.var_com_intellij_ui_EditorTextField_a);
|
||
this.var_javax_swing_JPanel_c.revalidate();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
String string = this.var_com_intellij_ui_EditorTextField_a.getText();
|
||
this.b(string);
|
||
if (StringUtils.isNotBlank((CharSequence)string)) {
|
||
if (com.ccnode.codegenerator.g.b.a()) {
|
||
List list = DbPsiFacade.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDataSources();
|
||
if (list.size() == 0) {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"No database found, please set up at least one database", (String)"No Database Found");
|
||
ToolWindow toolWindow = ToolWindowManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getToolWindow("Database");
|
||
if (toolWindow != null) {
|
||
toolWindow.show(null);
|
||
}
|
||
return;
|
||
}
|
||
ArrayList arrayList = ContainerUtil.newArrayList();
|
||
PersistenceConsoleProvider[] persistenceConsoleProviderArray = (PersistenceConsoleProvider[])PersistenceConsoleProvider.EP_NAME.getExtensions();
|
||
Editor editor = this.var_com_intellij_ui_EditorTextField_a.getEditor();
|
||
for (PersistenceConsoleProvider persistenceConsoleProvider : persistenceConsoleProviderArray) {
|
||
arrayList.addAll(persistenceConsoleProvider.getRunners((PsiElement)this.var_com_intellij_psi_PsiFile_a, editor));
|
||
}
|
||
if (arrayList.isEmpty()) {
|
||
this.a(string);
|
||
} else {
|
||
RunQueryInConsoleIntentionAction.chooseAndRunRunners((List)arrayList, (Editor)editor, (AnActionEvent)null);
|
||
}
|
||
} else {
|
||
CopyPasteManager.getInstance().setContents((Transferable)new StringSelection(string));
|
||
Messages.showInfoMessage((String)"Sql copied to clipboard", (String)"Success");
|
||
}
|
||
}
|
||
}
|
||
|
||
@NotNull
|
||
private String java_lang_String_b() {
|
||
i_0 i_02 = new i_0();
|
||
i_02.b((Map<String, String>)((Object)this.var_javax_swing_AbstractAction_b));
|
||
i_02.a((Map<String, Boolean>)((Object)this.var_javax_swing_AbstractAction_a));
|
||
String string = w_0.a.a(this.var_com_intellij_psi_xml_XmlTag_a, i_02);
|
||
try {
|
||
string = new com.ccnode.codegenerator.M.b.a().a(string);
|
||
}
|
||
catch (Exception exception) {
|
||
// empty catch block
|
||
}
|
||
string = com.ccnode.codegenerator.Y.a.a(string);
|
||
string = string.replace("\r\n", "\n");
|
||
return string;
|
||
}
|
||
|
||
private void d() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JSplitPane_a = new JSplitPane();
|
||
this.var_javax_swing_JSplitPane_a.setDividerLocation(400);
|
||
this.var_javax_swing_JSplitPane_a.setDividerSize(10);
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JSplitPane_a, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, new Dimension(700, 700), null, 0, false));
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JSplitPane_a.setRightComponent(this.var_javax_swing_JPanel_c);
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
this.var_javax_swing_JPanel_c.add((Component)jScrollPane, "Center");
|
||
jScrollPane.setViewportView((Component)this.var_com_intellij_ui_EditorTextField_a);
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JSplitPane_a.setLeftComponent(jPanel);
|
||
this.d = new JPanel();
|
||
this.d.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.d, "North");
|
||
JScrollPane jScrollPane2 = new JScrollPane();
|
||
jPanel.add((Component)jScrollPane2, "Center");
|
||
jScrollPane2.setViewportView(this.var_javax_swing_JPanel_a);
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
private class a
|
||
extends com.ccnode.codegenerator.a.a {
|
||
public a(b_0 b_03) {
|
||
super(AllIcons.Actions.Refresh);
|
||
}
|
||
|
||
public void actionPerformed(AnActionEvent anActionEvent) {
|
||
Object object;
|
||
if (!((com.ccnode.codegenerator.L.b)b_0.this).a.isValid()) {
|
||
Messages.showErrorDialog((Project)((com.ccnode.codegenerator.L.b)b_0.this).a, (String)"xml tag is not valid", (String)"Tag not valid");
|
||
return;
|
||
}
|
||
((com.ccnode.codegenerator.L.b)b_0.this).a = w_0.a.a(((com.ccnode.codegenerator.L.b)b_0.this).a);
|
||
Object object2 = ((com.ccnode.codegenerator.L.b)b_0.this).a.iterator();
|
||
while (object2.hasNext()) {
|
||
object = (String)object2.next();
|
||
if (((com.ccnode.codegenerator.L.b)b_0.this).a.containsKey(object)) continue;
|
||
((com.ccnode.codegenerator.L.b)b_0.this).a.put(object, true);
|
||
}
|
||
((com.ccnode.codegenerator.L.b)b_0.this).b = object2 = w_0.a.b(((com.ccnode.codegenerator.L.b)b_0.this).a);
|
||
object = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(((com.ccnode.codegenerator.L.b)b_0.this).a);
|
||
for (String string : ((com.ccnode.codegenerator.L.b)b_0.this).b) {
|
||
if (((com.ccnode.codegenerator.L.b)b_0.this).b.containsKey(string)) continue;
|
||
((com.ccnode.codegenerator.L.b)b_0.this).b.put(string, object.getOrDefault(string, ""));
|
||
}
|
||
((com.ccnode.codegenerator.L.b)b_0.this).a.removeAll();
|
||
b_0.this.b();
|
||
((com.ccnode.codegenerator.L.b)b_0.this).b.revalidate();
|
||
((com.ccnode.codegenerator.L.b)b_0.this).b.repaint();
|
||
b_0.this.c();
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.L.a
|
||
*/
|
||
public class a_0 {
|
||
private String a;
|
||
private String b;
|
||
private String c;
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(String string) {
|
||
this.b = string;
|
||
}
|
||
|
||
public String c() {
|
||
return this.c;
|
||
}
|
||
|
||
public void c(String string) {
|
||
this.c = string;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.L.c
|
||
*/
|
||
public class c_0 {
|
||
private String a;
|
||
|
||
public c_0(String string) {
|
||
this.a = string;
|
||
}
|
||
|
||
public String a() {
|
||
return this.a;
|
||
}
|
||
|
||
public String toString() {
|
||
return this.a + "== true";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$RunConfigurations$TestState
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.psi.xml.XmlTag
|
||
*/
|
||
package com.ccnode.codegenerator.l;
|
||
|
||
import com.ccnode.codegenerator.l.b_0;
|
||
import com.ccnode.codegenerator.w.a;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.psi.xml.XmlTag;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.L.e
|
||
*/
|
||
public class e_0
|
||
extends com.ccnode.codegenerator.a.a {
|
||
private XmlTag a;
|
||
|
||
public e_0(XmlTag xmlTag) {
|
||
super("Test current xml tag", null, AllIcons.RunConfigurations.TestState.Run);
|
||
this.a = xmlTag;
|
||
}
|
||
|
||
public void actionPerformed(AnActionEvent anActionEvent) {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
final /* synthetic */ AnActionEvent var_com_intellij_openapi_actionSystem_AnActionEvent_a;
|
||
final /* synthetic */ e_0 var_com_ccnode_codegenerator_l_e_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_l_e_0_a = e_02;
|
||
this.var_com_intellij_openapi_actionSystem_AnActionEvent_a = anActionEvent;
|
||
}
|
||
|
||
public void run() {
|
||
boolean bl = com.ccnode.codegenerator.ah.a.a.a(this.var_com_intellij_openapi_actionSystem_AnActionEvent_a.getProject());
|
||
if (!bl) {
|
||
return;
|
||
}
|
||
com.ccnode.codegenerator.w.a.a();
|
||
b_0 b_02 = new b_0(this.var_com_intellij_openapi_actionSystem_AnActionEvent_a.getProject(), this.var_com_ccnode_codegenerator_l_e_0_a.a, false);
|
||
b_02.show();
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.PluginState;
|
||
|
||
public interface ConfigChangeListener {
|
||
public void onConfigChange(PluginState var1, PluginState var2);
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public class DataBaseConstants {
|
||
public static final String MYSQL = "MySql";
|
||
public static final String ORACLE = "Oracle";
|
||
public static final String SQLITE = "Sqlite";
|
||
public static final String PostgreSQL = "PostgreSQL";
|
||
public static final String SqlServer = "SqlServer";
|
||
public static final String UNSET = "UNSET";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public enum DatabaseEnums {
|
||
MySql,
|
||
Oracle,
|
||
Sqlite,
|
||
PostgreSQL,
|
||
SqlServer;
|
||
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
|
||
public class DefaultState {
|
||
public static Profile createDefault() {
|
||
Profile profile = new Profile();
|
||
return profile;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* org.apache.commons.lang.builder.EqualsBuilder
|
||
* org.apache.commons.lang.builder.HashCodeBuilder
|
||
* org.apache.commons.lang.builder.ReflectionToStringBuilder
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
|
||
|
||
public abstract class DomainObject {
|
||
public boolean equals(Object object) {
|
||
return EqualsBuilder.reflectionEquals((Object)this, (Object)object, (boolean)false);
|
||
}
|
||
|
||
public String toString() {
|
||
return ReflectionToStringBuilder.toString((Object)this);
|
||
}
|
||
|
||
public int hashCode() {
|
||
return HashCodeBuilder.reflectionHashCode((Object)this);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public class FormatterConstats {
|
||
public static final String UsePluginFormatter = "Plugin formatter";
|
||
public static final String USEIDEAOWN = "IDEA default formatter";
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public class MyColumnOverride {
|
||
private String columnName;
|
||
private String javaProperty;
|
||
private String jdbcType;
|
||
private String javaType;
|
||
private String typeHandler;
|
||
|
||
public MyColumnOverride() {
|
||
}
|
||
|
||
public MyColumnOverride(String string) {
|
||
this.columnName = string;
|
||
}
|
||
|
||
public String getColumnName() {
|
||
return this.columnName;
|
||
}
|
||
|
||
public String getJavaProperty() {
|
||
return this.javaProperty;
|
||
}
|
||
|
||
public String getJdbcType() {
|
||
return this.jdbcType;
|
||
}
|
||
|
||
public String getJavaType() {
|
||
return this.javaType;
|
||
}
|
||
|
||
public String getTypeHandler() {
|
||
return this.typeHandler;
|
||
}
|
||
|
||
public void setColumnName(String string) {
|
||
this.columnName = string;
|
||
}
|
||
|
||
public void setJavaProperty(String string) {
|
||
this.javaProperty = string;
|
||
}
|
||
|
||
public void setJdbcType(String string) {
|
||
this.jdbcType = string;
|
||
}
|
||
|
||
public void setJavaType(String string) {
|
||
this.javaType = string;
|
||
}
|
||
|
||
public void setTypeHandler(String string) {
|
||
this.typeHandler = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof MyColumnOverride)) {
|
||
return false;
|
||
}
|
||
MyColumnOverride myColumnOverride = (MyColumnOverride)object;
|
||
if (!myColumnOverride.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getColumnName();
|
||
String string2 = myColumnOverride.getColumnName();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
String string3 = this.getJavaProperty();
|
||
String string4 = myColumnOverride.getJavaProperty();
|
||
if (string3 == null ? string4 != null : !string3.equals(string4)) {
|
||
return false;
|
||
}
|
||
String string5 = this.getJdbcType();
|
||
String string6 = myColumnOverride.getJdbcType();
|
||
if (string5 == null ? string6 != null : !string5.equals(string6)) {
|
||
return false;
|
||
}
|
||
String string7 = this.getJavaType();
|
||
String string8 = myColumnOverride.getJavaType();
|
||
if (string7 == null ? string8 != null : !string7.equals(string8)) {
|
||
return false;
|
||
}
|
||
String string9 = this.getTypeHandler();
|
||
String string10 = myColumnOverride.getTypeHandler();
|
||
return !(string9 == null ? string10 != null : !string9.equals(string10));
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof MyColumnOverride;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getColumnName();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
String string2 = this.getJavaProperty();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
String string3 = this.getJdbcType();
|
||
n3 = n3 * 59 + (string3 == null ? 43 : string3.hashCode());
|
||
String string4 = this.getJavaType();
|
||
n3 = n3 * 59 + (string4 == null ? 43 : string4.hashCode());
|
||
String string5 = this.getTypeHandler();
|
||
n3 = n3 * 59 + (string5 == null ? 43 : string5.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "MyColumnOverride(columnName=" + this.getColumnName() + ", javaProperty=" + this.getJavaProperty() + ", jdbcType=" + this.getJdbcType() + ", javaType=" + this.getJavaType() + ", typeHandler=" + this.getTypeHandler() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public class MyIgnoredColumn {
|
||
private String columnName;
|
||
|
||
public MyIgnoredColumn(String string) {
|
||
this.columnName = string;
|
||
}
|
||
|
||
public MyIgnoredColumn() {
|
||
}
|
||
|
||
public String getColumnName() {
|
||
return this.columnName;
|
||
}
|
||
|
||
public void setColumnName(String string) {
|
||
this.columnName = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof MyIgnoredColumn)) {
|
||
return false;
|
||
}
|
||
MyIgnoredColumn myIgnoredColumn = (MyIgnoredColumn)object;
|
||
if (!myIgnoredColumn.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getColumnName();
|
||
String string2 = myIgnoredColumn.getColumnName();
|
||
return !(string == null ? string2 != null : !string.equals(string2));
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof MyIgnoredColumn;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getColumnName();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "MyIgnoredColumn(columnName=" + this.getColumnName() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import com.ccnode.codegenerator.ad.z;
|
||
import com.ccnode.codegenerator.myconfigurable.DomainObject;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
|
||
public class PluginState
|
||
extends DomainObject
|
||
implements Cloneable {
|
||
private Profile profile;
|
||
|
||
public void setProfile(Profile profile) {
|
||
this.profile = profile;
|
||
}
|
||
|
||
public PluginState clone() {
|
||
return (PluginState)z.a().deepClone((Object)this);
|
||
}
|
||
|
||
public Profile getDefaultProfile() {
|
||
if (this.profile != null) {
|
||
return this.profile;
|
||
}
|
||
this.profile = new Profile();
|
||
return this.profile;
|
||
}
|
||
|
||
public Profile getProfile() {
|
||
return this.profile;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import java.lang.annotation.ElementType;
|
||
import java.lang.annotation.Retention;
|
||
import java.lang.annotation.RetentionPolicy;
|
||
import java.lang.annotation.Target;
|
||
|
||
@Retention(value=RetentionPolicy.RUNTIME)
|
||
@Target(value={ElementType.FIELD})
|
||
public @interface ProjectConfig {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.IntellijDatabaseUserNameAndPassword;
|
||
import com.ccnode.codegenerator.myconfigurable.NewDatabaseInfo;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.myconfigurable.TestConfiguration;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class ProjectState {
|
||
private List<NewDatabaseInfo> databaseInfos = new ArrayList<NewDatabaseInfo>();
|
||
private Map<String, IntellijDatabaseUserNameAndPassword> intellijDatabaseUserNameAndPasswordMap = Maps.newHashMap();
|
||
private TestConfiguration lastUsedTestConfiguration;
|
||
private List<TestConfiguration> testConfigurations = Lists.newArrayList();
|
||
private NewDatabaseInfo activeDatabaseInfo;
|
||
private ProjectProfile projectProfile = new ProjectProfile();
|
||
|
||
public List<NewDatabaseInfo> getDatabaseInfos() {
|
||
return this.databaseInfos;
|
||
}
|
||
|
||
public void setDatabaseInfos(List<NewDatabaseInfo> list) {
|
||
this.databaseInfos = list;
|
||
}
|
||
|
||
public NewDatabaseInfo getActiveDatabaseInfo() {
|
||
return this.activeDatabaseInfo;
|
||
}
|
||
|
||
public void setActiveDatabaseInfo(NewDatabaseInfo newDatabaseInfo) {
|
||
this.activeDatabaseInfo = newDatabaseInfo;
|
||
}
|
||
|
||
@NotNull
|
||
public ProjectProfile getProjectProfile() {
|
||
return this.projectProfile;
|
||
}
|
||
|
||
public void setProjectProfile(ProjectProfile projectProfile) {
|
||
this.projectProfile = projectProfile;
|
||
}
|
||
|
||
public Map<String, IntellijDatabaseUserNameAndPassword> getIntellijDatabaseUserNameAndPasswordMap() {
|
||
return this.intellijDatabaseUserNameAndPasswordMap;
|
||
}
|
||
|
||
public void setIntellijDatabaseUserNameAndPasswordMap(Map<String, IntellijDatabaseUserNameAndPassword> map) {
|
||
this.intellijDatabaseUserNameAndPasswordMap = map;
|
||
}
|
||
|
||
public TestConfiguration getLastUsedTestConfiguration() {
|
||
return this.lastUsedTestConfiguration;
|
||
}
|
||
|
||
public void setLastUsedTestConfiguration(TestConfiguration testConfiguration) {
|
||
this.lastUsedTestConfiguration = testConfiguration;
|
||
}
|
||
|
||
public List<TestConfiguration> getTestConfigurations() {
|
||
return this.testConfigurations;
|
||
}
|
||
|
||
public void setTestConfigurations(List<TestConfiguration> list) {
|
||
this.testConfigurations = list;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public enum SearchScopeEnum {
|
||
MODULE,
|
||
PROJECT;
|
||
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import java.beans.ConstructorProperties;
|
||
|
||
public class TestConfiguration {
|
||
private String url;
|
||
private String userName;
|
||
private String password;
|
||
private Boolean intellij;
|
||
private String driverClass;
|
||
private String from;
|
||
private Integer order;
|
||
|
||
public TestConfiguration() {
|
||
}
|
||
|
||
@ConstructorProperties(value={"url", "userName", "password", "intellij", "driverClass", "from", "order"})
|
||
public TestConfiguration(String string, String string2, String string3, Boolean bl, String string4, String string5, Integer n2) {
|
||
this.url = string;
|
||
this.userName = string2;
|
||
this.password = string3;
|
||
this.intellij = bl;
|
||
this.driverClass = string4;
|
||
this.from = string5;
|
||
this.order = n2;
|
||
}
|
||
|
||
public String getUrl() {
|
||
return this.url;
|
||
}
|
||
|
||
public String getUserName() {
|
||
return this.userName;
|
||
}
|
||
|
||
public String getPassword() {
|
||
return this.password;
|
||
}
|
||
|
||
public Boolean getIntellij() {
|
||
return this.intellij;
|
||
}
|
||
|
||
public String getDriverClass() {
|
||
return this.driverClass;
|
||
}
|
||
|
||
public String getFrom() {
|
||
return this.from;
|
||
}
|
||
|
||
public Integer getOrder() {
|
||
return this.order;
|
||
}
|
||
|
||
public void setUrl(String string) {
|
||
this.url = string;
|
||
}
|
||
|
||
public void setUserName(String string) {
|
||
this.userName = string;
|
||
}
|
||
|
||
public void setPassword(String string) {
|
||
this.password = string;
|
||
}
|
||
|
||
public void setIntellij(Boolean bl) {
|
||
this.intellij = bl;
|
||
}
|
||
|
||
public void setDriverClass(String string) {
|
||
this.driverClass = string;
|
||
}
|
||
|
||
public void setFrom(String string) {
|
||
this.from = string;
|
||
}
|
||
|
||
public void setOrder(Integer n2) {
|
||
this.order = n2;
|
||
}
|
||
|
||
public String toString() {
|
||
return "url:" + this.url + ", from:" + this.from;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
public class TypeMapper {
|
||
private String columnType;
|
||
private String javaType;
|
||
|
||
public TypeMapper(String string, String string2) {
|
||
this.columnType = string;
|
||
this.javaType = string2;
|
||
}
|
||
|
||
public String getColumnType() {
|
||
return this.columnType;
|
||
}
|
||
|
||
public String getJavaType() {
|
||
return this.javaType;
|
||
}
|
||
|
||
public void setColumnType(String string) {
|
||
this.columnType = string;
|
||
}
|
||
|
||
public void setJavaType(String string) {
|
||
this.javaType = string;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof TypeMapper)) {
|
||
return false;
|
||
}
|
||
TypeMapper typeMapper = (TypeMapper)object;
|
||
if (!typeMapper.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getColumnType();
|
||
String string2 = typeMapper.getColumnType();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
String string3 = this.getJavaType();
|
||
String string4 = typeMapper.getJavaType();
|
||
return !(string3 == null ? string4 != null : !string3.equals(string4));
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof TypeMapper;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getColumnType();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
String string2 = this.getJavaType();
|
||
n3 = n3 * 59 + (string2 == null ? 43 : string2.hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "TypeMapper(columnType=" + this.getColumnType() + ", javaType=" + this.getJavaType() + ")";
|
||
}
|
||
|
||
public TypeMapper() {
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import com.ccnode.codegenerator.myconfigurable.TypeMapper;
|
||
import com.ccnode.codegenerator.typemapper.AbstractGroup;
|
||
import java.util.List;
|
||
|
||
public class TypeMapperGroup
|
||
implements AbstractGroup<TypeMapper> {
|
||
private String name;
|
||
private List<TypeMapper> elementList;
|
||
|
||
@Override
|
||
public String getName() {
|
||
return this.name;
|
||
}
|
||
|
||
@Override
|
||
public List<TypeMapper> getElementList() {
|
||
return this.elementList;
|
||
}
|
||
|
||
@Override
|
||
public void setName(String string) {
|
||
this.name = string;
|
||
}
|
||
|
||
@Override
|
||
public void setElementList(List<TypeMapper> list) {
|
||
this.elementList = list;
|
||
}
|
||
|
||
public boolean equals(Object object) {
|
||
if (object == this) {
|
||
return true;
|
||
}
|
||
if (!(object instanceof TypeMapperGroup)) {
|
||
return false;
|
||
}
|
||
TypeMapperGroup typeMapperGroup = (TypeMapperGroup)object;
|
||
if (!typeMapperGroup.canEqual(this)) {
|
||
return false;
|
||
}
|
||
String string = this.getName();
|
||
String string2 = typeMapperGroup.getName();
|
||
if (string == null ? string2 != null : !string.equals(string2)) {
|
||
return false;
|
||
}
|
||
List<TypeMapper> list = this.getElementList();
|
||
List<TypeMapper> list2 = typeMapperGroup.getElementList();
|
||
return !(list == null ? list2 != null : !((Object)list).equals(list2));
|
||
}
|
||
|
||
protected boolean canEqual(Object object) {
|
||
return object instanceof TypeMapperGroup;
|
||
}
|
||
|
||
public int hashCode() {
|
||
int n2 = 59;
|
||
int n3 = 1;
|
||
String string = this.getName();
|
||
n3 = n3 * 59 + (string == null ? 43 : string.hashCode());
|
||
List<TypeMapper> list = this.getElementList();
|
||
n3 = n3 * 59 + (list == null ? 43 : ((Object)list).hashCode());
|
||
return n3;
|
||
}
|
||
|
||
public String toString() {
|
||
return "TypeMapperGroup(name=" + this.getName() + ", elementList=" + this.getElementList() + ")";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.myconfigurable;
|
||
|
||
import com.ccnode.codegenerator.j.a;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.ccnode.codegenerator.myconfigurable.TypeMapper;
|
||
import com.ccnode.codegenerator.myconfigurable.TypeMapperGroup;
|
||
import java.util.List;
|
||
import java.util.regex.Pattern;
|
||
|
||
public class TypeUtils {
|
||
public static String getColumnType(String string) {
|
||
List<TypeMapper> list = TypeUtils.getCurrTypeMapperGroup().getElementList();
|
||
for (TypeMapper typeMapper : list) {
|
||
if (!Pattern.compile(typeMapper.getColumnType(), 2).matcher(string).matches()) continue;
|
||
return typeMapper.getJavaType();
|
||
}
|
||
return "java.lang.Object";
|
||
}
|
||
|
||
public static String getColumnTypeOrNull(String string) {
|
||
List<TypeMapper> list = TypeUtils.getCurrTypeMapperGroup().getElementList();
|
||
for (TypeMapper typeMapper : list) {
|
||
if (!Pattern.compile(typeMapper.getColumnType(), 2).matcher(string).matches()) continue;
|
||
return typeMapper.getJavaType();
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public static TypeMapperGroup getCurrTypeMapperGroup() {
|
||
Profile profile = a.com_ccnode_codegenerator_myconfigurable_Profile_a();
|
||
String string = profile.getCurrTypeMapperGroupName();
|
||
return profile.getTypeMapperGroupMap().get(string);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
|
||
* com.intellij.openapi.options.Configurable
|
||
* com.intellij.openapi.options.ConfigurationException
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.project.ProjectManager
|
||
* org.jetbrains.annotations.Nls
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.i;
|
||
|
||
import com.ccnode.codegenerator.H.e;
|
||
import com.ccnode.codegenerator.I.d;
|
||
import com.ccnode.codegenerator.j.a;
|
||
import com.ccnode.codegenerator.myconfigurable.ConfigChangeListener;
|
||
import com.ccnode.codegenerator.myconfigurable.PluginState;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
|
||
import com.intellij.openapi.options.Configurable;
|
||
import com.intellij.openapi.options.ConfigurationException;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.project.ProjectManager;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import javax.swing.JComponent;
|
||
import org.jetbrains.annotations.Nls;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.I.a
|
||
*/
|
||
public class a_0
|
||
implements Configurable {
|
||
public a var_com_ccnode_codegenerator_j_a_a = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_j_a_a();
|
||
private d var_com_ccnode_codegenerator_I_d_a;
|
||
private static List<ConfigChangeListener> var_java_util_List_com_ccnode_codegenerator_myconfigurable_ConfigChangeListener__a;
|
||
|
||
@Nls
|
||
public String getDisplayName() {
|
||
return "MyBatisCodeHelperPro";
|
||
}
|
||
|
||
private static void a() {
|
||
Project[] projectArray;
|
||
for (Project project : projectArray = ProjectManager.getInstance().getOpenProjects()) {
|
||
DaemonCodeAnalyzer.getInstance((Project)project).restart();
|
||
}
|
||
}
|
||
|
||
@Nullable
|
||
public String getHelpTopic() {
|
||
return null;
|
||
}
|
||
|
||
@Nullable
|
||
public JComponent createComponent() {
|
||
if (this.var_com_ccnode_codegenerator_I_d_a == null) {
|
||
this.var_com_ccnode_codegenerator_I_d_a = new d(this.var_com_ccnode_codegenerator_j_a_a.com_ccnode_codegenerator_myconfigurable_PluginState_a().clone());
|
||
}
|
||
return this.var_com_ccnode_codegenerator_I_d_a.javax_swing_JPanel_a();
|
||
}
|
||
|
||
public boolean isModified() {
|
||
return this.var_com_ccnode_codegenerator_I_d_a != null && this.var_com_ccnode_codegenerator_I_d_a.boolean_a(this.var_com_ccnode_codegenerator_j_a_a.com_ccnode_codegenerator_myconfigurable_PluginState_a());
|
||
}
|
||
|
||
public void apply() throws ConfigurationException {
|
||
PluginState pluginState = this.var_com_ccnode_codegenerator_j_a_a.com_ccnode_codegenerator_myconfigurable_PluginState_a();
|
||
PluginState pluginState2 = this.var_com_ccnode_codegenerator_I_d_a.com_ccnode_codegenerator_myconfigurable_PluginState_a();
|
||
Iterator iterator = var_com_ccnode_codegenerator_j_a_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
ConfigChangeListener configChangeListener = (ConfigChangeListener)iterator.next();
|
||
configChangeListener.onConfigChange(pluginState, pluginState2);
|
||
}
|
||
this.var_com_ccnode_codegenerator_j_a_a.a(pluginState2.clone());
|
||
}
|
||
|
||
public void reset() {
|
||
if (this.var_com_ccnode_codegenerator_I_d_a != null) {
|
||
this.var_com_ccnode_codegenerator_I_d_a.void_a(this.var_com_ccnode_codegenerator_j_a_a.com_ccnode_codegenerator_myconfigurable_PluginState_a().clone());
|
||
}
|
||
}
|
||
|
||
public void disposeUIResources() {
|
||
this.var_com_ccnode_codegenerator_I_d_a = null;
|
||
}
|
||
|
||
public static void a(ConfigChangeListener configChangeListener) {
|
||
var_com_ccnode_codegenerator_j_a_a.add(configChangeListener);
|
||
}
|
||
|
||
static {
|
||
var_com_ccnode_codegenerator_j_a_a = Lists.newArrayList((Object[])new ConfigChangeListener[]{new ConfigChangeListener(){
|
||
|
||
public void onConfigChange(PluginState pluginState, PluginState pluginState2) {
|
||
boolean bl = false;
|
||
if (pluginState.getProfile().getUseActualParamNames() != pluginState2.getProfile().getUseActualParamNames()) {
|
||
e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
bl = true;
|
||
}
|
||
if (pluginState.getProfile().getUseXmlParameterTypeAsParameterTypeIfExtends() != pluginState2.getProfile().getUseXmlParameterTypeAsParameterTypeIfExtends()) {
|
||
e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
bl = true;
|
||
}
|
||
if (!pluginState.getProfile().getSkipParamForAnalyze().equals(pluginState2.getProfile().getSkipParamForAnalyze())) {
|
||
e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
bl = true;
|
||
}
|
||
if (!pluginState.getProfile().getUseNewIndex() == pluginState2.getProfile().getUseNewIndex()) {
|
||
e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
bl = true;
|
||
}
|
||
if (!pluginState.getProfile().getOgnlSingleParamAnyName() == pluginState2.getProfile().getOgnlSingleParamAnyName()) {
|
||
e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
bl = true;
|
||
}
|
||
if (!pluginState.getProfile().getSupportIncludeWithProperty() == pluginState2.getProfile().getSupportIncludeWithProperty()) {
|
||
e.com_ccnode_codegenerator_H_e_a().void_a();
|
||
bl = true;
|
||
}
|
||
if (bl) {
|
||
a_0.a();
|
||
}
|
||
}
|
||
}});
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.options.Configurable
|
||
* com.intellij.openapi.options.ConfigurationException
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.Nls
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.i;
|
||
|
||
import com.ccnode.codegenerator.I.c;
|
||
import com.ccnode.codegenerator.ag.e.e;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.intellij.openapi.options.Configurable;
|
||
import com.intellij.openapi.options.ConfigurationException;
|
||
import com.intellij.openapi.project.Project;
|
||
import javax.swing.JComponent;
|
||
import org.jetbrains.annotations.Nls;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.I.b
|
||
*/
|
||
public class b_0
|
||
implements Configurable {
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private c var_com_ccnode_codegenerator_I_c_a;
|
||
|
||
public b_0(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Nls
|
||
public String getDisplayName() {
|
||
return "ProjectConfig";
|
||
}
|
||
|
||
@Nullable
|
||
public String getHelpTopic() {
|
||
return null;
|
||
}
|
||
|
||
@Nullable
|
||
public JComponent createComponent() {
|
||
if (this.var_com_intellij_openapi_project_Project_a == null) {
|
||
return null;
|
||
}
|
||
ProjectProfile projectProfile = e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a);
|
||
if (this.var_com_ccnode_codegenerator_I_c_a == null) {
|
||
this.var_com_ccnode_codegenerator_I_c_a = new c(projectProfile.clone(), this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
return this.var_com_ccnode_codegenerator_I_c_a.javax_swing_JComponent_a();
|
||
}
|
||
|
||
public boolean isModified() {
|
||
return this.var_com_ccnode_codegenerator_I_c_a != null && this.var_com_ccnode_codegenerator_I_c_a.boolean_a(e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a));
|
||
}
|
||
|
||
public void apply() throws ConfigurationException {
|
||
if (this.var_com_ccnode_codegenerator_I_c_a != null) {
|
||
this.var_com_ccnode_codegenerator_I_c_a.b(e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a));
|
||
}
|
||
}
|
||
|
||
public void reset() {
|
||
if (this.var_com_ccnode_codegenerator_I_c_a != null) {
|
||
this.var_com_ccnode_codegenerator_I_c_a.c(e.com_ccnode_codegenerator_myconfigurable_ProjectProfile_a(this.var_com_intellij_openapi_project_Project_a));
|
||
}
|
||
}
|
||
|
||
public void disposeUIResources() {
|
||
this.var_com_ccnode_codegenerator_I_c_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.google.common.collect.Maps
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.ComboBox
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* com.intellij.util.FileContentUtil
|
||
* com.intellij.util.ObjectUtils
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.I;
|
||
|
||
import com.ccnode.codegenerator.ad.b_0;
|
||
import com.ccnode.codegenerator.ag.e.a;
|
||
import com.ccnode.codegenerator.mybatisGenerator.d;
|
||
import com.ccnode.codegenerator.mybatisGenerator.k;
|
||
import com.ccnode.codegenerator.mybatisGenerator.w;
|
||
import com.ccnode.codegenerator.myconfigurable.DatabaseEnums;
|
||
import com.ccnode.codegenerator.myconfigurable.ProjectProfile;
|
||
import com.ccnode.codegenerator.myconfigurable.SearchScopeEnum;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.google.common.collect.Maps;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.ComboBox;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import com.intellij.util.FileContentUtil;
|
||
import com.intellij.util.ObjectUtils;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ArrayList;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.ResourceBundle;
|
||
import java.util.Set;
|
||
import java.util.function.BiConsumer;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.Icon;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextArea;
|
||
import javax.swing.JTextField;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class c {
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JCheckBox e;
|
||
private JTextField var_javax_swing_JTextField_a;
|
||
private JTextField var_javax_swing_JTextField_b;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
public JTextArea var_javax_swing_JTextArea_a;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
public JComboBox var_javax_swing_JComboBox_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_a;
|
||
public JComboBox var_javax_swing_JComboBox_b;
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
private JComboBox var_javax_swing_JComboBox_c;
|
||
private JCheckBox f;
|
||
private JTextField var_javax_swing_JTextField_c;
|
||
private JLabel var_javax_swing_JLabel_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_b;
|
||
public JCheckBox var_javax_swing_JCheckBox_c;
|
||
public JCheckBox d;
|
||
public JButton var_javax_swing_JButton_a;
|
||
private ProjectProfile var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
public c(ProjectProfile projectProfile, Project project) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a = projectProfile;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.void_a();
|
||
this.var_javax_swing_JComboBox_a.addItem(SearchScopeEnum.PROJECT.name());
|
||
this.var_javax_swing_JComboBox_a.addItem(SearchScopeEnum.MODULE.name());
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://gejun123456.github.io/MyBatisCodeHelper-Pro/#/quicktestsql");
|
||
}
|
||
}, null);
|
||
this.var_javax_swing_JComboBox_c.addItem("Junit4");
|
||
this.var_javax_swing_JComboBox_c.addItem("Junit5");
|
||
this.var_javax_swing_JComboBox_c.setSelectedItem(projectProfile.getTestCasePlatForm());
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ c var_com_ccnode_codegenerator_I_c_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_I_c_a = c2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = Messages.showInputDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"TypeAliasPackages", (String)"TypeAliasPackages", (Icon)Messages.getInformationIcon(), null, null);
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
Set<String> set = b_0.a.a(string, this.var_com_intellij_openapi_project_Project_a);
|
||
if (set.isEmpty()) {
|
||
Messages.showInfoMessage((Project)this.var_com_intellij_openapi_project_Project_a, (String)"no package found", (String)"no package found");
|
||
return;
|
||
}
|
||
String string2 = Joiner.on((String)";").join(set);
|
||
new a(this.var_com_intellij_openapi_project_Project_a, string2).show();
|
||
}
|
||
}
|
||
});
|
||
this.c(projectProfile);
|
||
}
|
||
|
||
public void void_a(ProjectProfile projectProfile) {
|
||
this.c(projectProfile);
|
||
}
|
||
|
||
private void void_a() {
|
||
this.b();
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(8, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(11, 8, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.e = new JCheckBox();
|
||
this.a(this.e, this.a("i18n/i18n", "searchxmlforbaseclass"));
|
||
jPanel.add((Component)this.e, new GridConstraints(1, 0, 1, 6, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "removetableprename.use.to.split.when.multiple.exist"));
|
||
jPanel.add((Component)jLabel, new GridConstraints(2, 0, 1, 3, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "typealiaspackages.use.to.split.when.multiple.exist"));
|
||
jPanel.add((Component)jLabel2, new GridConstraints(4, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(4, 3, 1, 5, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "searchscope"));
|
||
jPanel.add((Component)jLabel3, new GridConstraints(6, 0, 1, 3, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(2, 3, 1, 5, 0, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
jPanel.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(6, 3, 1, 5, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", "supresssqltagerror"));
|
||
jPanel.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(7, 0, 1, 3, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(0, 0, 1, 8, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
this.a(jLabel4, this.a("i18n/i18n", "database"));
|
||
jPanel2.add((Component)jLabel4, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_b.setEnabled(true);
|
||
jPanel2.add((Component)this.var_javax_swing_JComboBox_b, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel2.add((Component)spacer, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.f = new JCheckBox();
|
||
this.f.setText("sqlSession(namespace+id)");
|
||
jPanel.add((Component)this.f, new GridConstraints(9, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JLabel_a = new JLabel();
|
||
this.var_javax_swing_JLabel_a.setText("sql session quatified class name(use ; to split)");
|
||
jPanel.add((Component)this.var_javax_swing_JLabel_a, new GridConstraints(10, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
jPanel.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(10, 3, 1, 5, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JCheckBox_b = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_b, this.a("i18n/i18n", "mybatis.annotation"));
|
||
jPanel.add((Component)this.var_javax_swing_JCheckBox_b, new GridConstraints(8, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "convert.typealias.and.to.full.pacakgename"));
|
||
jPanel.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(5, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
this.a(jLabel5, this.a("text/BatsLogBundle", "need.remove.table.cache.if.generate.on.table.again.to.make.it.work"));
|
||
jPanel.add((Component)jLabel5, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer2 = new Spacer();
|
||
this.var_javax_swing_JPanel_b.add((Component)spacer2, new GridConstraints(7, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JPanel_c, new GridConstraints(3, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_c.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "methodnameforprojecttables"), 0, 0, null, null));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel3, new GridConstraints(5, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel3.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "testcaseadditionconfigration"), 0, 0, null, null));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setText("example");
|
||
jPanel3.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(0, 0, 1, 1, 0, 0, 3, 3, null, null, null, 0, false));
|
||
Spacer spacer3 = new Spacer();
|
||
jPanel3.add((Component)spacer3, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
Spacer spacer4 = new Spacer();
|
||
jPanel3.add((Component)spacer4, new GridConstraints(1, 0, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
jPanel3.add((Component)this.var_javax_swing_JTextArea_a, new GridConstraints(1, 1, 1, 1, 0, 3, 4, 4, null, new Dimension(150, 50), null, 0, false));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(6, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_a.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "convertMethod"), 0, 0, null, null));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_b.add((Component)jPanel4, new GridConstraints(4, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel6 = new JLabel();
|
||
jLabel6.setText("testCasePlatForm");
|
||
jPanel4.add((Component)jLabel6, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_c = new JComboBox();
|
||
jPanel4.add((Component)this.var_javax_swing_JComboBox_c, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_c = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_c, this.a("i18n/i18n", "xml.include.contain.bind.variable"));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JCheckBox_c, new GridConstraints(2, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.d = new JCheckBox();
|
||
this.a(this.d, this.a("i18n/i18n", "auto.inject.prefix.and.suffix.for.mybatis.sqltag"));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.d, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
jLabel.setLabelFor(this.var_javax_swing_JTextField_a);
|
||
jLabel2.setLabelFor(this.var_javax_swing_JTextField_b);
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = this.getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_b;
|
||
}
|
||
|
||
public boolean boolean_a(ProjectProfile projectProfile) {
|
||
this.d(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a);
|
||
return !this.a(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a, projectProfile);
|
||
}
|
||
|
||
private boolean a(ProjectProfile projectProfile, ProjectProfile projectProfile2) {
|
||
if (!projectProfile.getDatabase().equals(projectProfile2.getDatabase())) {
|
||
return false;
|
||
}
|
||
if (projectProfile.getBaseClassSearchXml() != projectProfile2.getBaseClassSearchXml()) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getRemoveTablePreName().equals(projectProfile2.getRemoveTablePreName())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getTypeAliasPackages().equals(projectProfile2.getTypeAliasPackages())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getMethodNameForProjectList().equals(projectProfile2.getMethodNameForProjectList())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getJavaMethodProfiles().equals(projectProfile2.getJavaMethodProfiles())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getSearchScope().equals(projectProfile2.getSearchScope())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getSupressSqlTagReferenceError() == projectProfile2.getSupressSqlTagReferenceError()) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getTestcaseAdditionalConfiguration().equals(projectProfile2.getTestcaseAdditionalConfiguration())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getTestCasePlatForm().equals(projectProfile2.getTestCasePlatForm())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getSupportSqlSessionSelect() == projectProfile2.getSupportSqlSessionSelect()) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getSqlSessionQuatifiedName().equals(projectProfile2.getSqlSessionQuatifiedName())) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getMybatisAnnotationSupport() == projectProfile2.getMybatisAnnotationSupport()) {
|
||
return false;
|
||
}
|
||
if (!projectProfile.getSupportIncludeWithBinds() == projectProfile2.getSupportIncludeWithBinds()) {
|
||
return false;
|
||
}
|
||
return !projectProfile.getAutoInjectPrefixAndSuffixForSqlTag() != projectProfile2.getAutoInjectPrefixAndSuffixForSqlTag();
|
||
}
|
||
|
||
private void d(ProjectProfile projectProfile) {
|
||
projectProfile.setBaseClassSearchXml(this.e.isSelected());
|
||
projectProfile.setRemoveTablePreName(this.var_javax_swing_JTextField_a.getText());
|
||
projectProfile.setTypeAliasPackages(this.var_javax_swing_JTextField_b.getText());
|
||
projectProfile.setTestcaseAdditionalConfiguration(this.var_javax_swing_JTextArea_a.getText());
|
||
projectProfile.setSearchScope((String)this.var_javax_swing_JComboBox_a.getSelectedItem());
|
||
projectProfile.setSupressSqlTagReferenceError(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
projectProfile.setTestCasePlatForm((String)this.var_javax_swing_JComboBox_c.getSelectedItem());
|
||
k k2 = (k)((Object)ObjectUtils.tryCast((Object)this.var_javax_swing_JPanel_c, k.class));
|
||
projectProfile.setDatabase((String)this.var_javax_swing_JComboBox_b.getSelectedItem());
|
||
List<String> list = k2.b();
|
||
if (list != null) {
|
||
projectProfile.setMethodNameForProjectList(list);
|
||
} else {
|
||
projectProfile.setMethodNameForProjectList(Lists.newArrayList());
|
||
}
|
||
d d2 = (d)((Object)ObjectUtils.tryCast((Object)this.var_javax_swing_JPanel_a, d.class));
|
||
List<w> list2 = d2.a();
|
||
HashMap hashMap = Maps.newHashMap();
|
||
for (w w2 : list2) {
|
||
hashMap.put(w2.a(), w2.b());
|
||
}
|
||
projectProfile.setJavaMethodProfiles(hashMap);
|
||
projectProfile.setSupportSqlSessionSelect(this.f.isSelected());
|
||
projectProfile.setSqlSessionQuatifiedName(this.var_javax_swing_JTextField_c.getText());
|
||
projectProfile.setMybatisAnnotationSupport(this.var_javax_swing_JCheckBox_b.isSelected());
|
||
projectProfile.setSupportIncludeWithBinds(this.var_javax_swing_JCheckBox_c.isSelected());
|
||
projectProfile.setAutoInjectPrefixAndSuffixForSqlTag(this.d.isSelected());
|
||
}
|
||
|
||
public void b(ProjectProfile projectProfile) {
|
||
this.d(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a);
|
||
this.d(projectProfile);
|
||
FileContentUtil.reparseOpenedFiles();
|
||
}
|
||
|
||
public void c(ProjectProfile projectProfile) {
|
||
this.e.setSelected(projectProfile.getBaseClassSearchXml());
|
||
this.var_javax_swing_JTextField_a.setText(projectProfile.getRemoveTablePreName());
|
||
this.var_javax_swing_JTextField_b.setText(projectProfile.getTypeAliasPackages());
|
||
this.var_javax_swing_JTextArea_a.setText(projectProfile.getTestcaseAdditionalConfiguration());
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(projectProfile.getSearchScope());
|
||
this.var_javax_swing_JCheckBox_a.setSelected(projectProfile.getSupressSqlTagReferenceError());
|
||
this.var_javax_swing_JComboBox_b.setSelectedItem(projectProfile.getDatabase());
|
||
this.f.setSelected(projectProfile.getSupportSqlSessionSelect());
|
||
this.var_javax_swing_JTextField_c.setText(projectProfile.getSqlSessionQuatifiedName());
|
||
this.var_javax_swing_JComboBox_c.setSelectedItem(projectProfile.getTestCasePlatForm());
|
||
this.var_javax_swing_JCheckBox_b.setSelected(projectProfile.getMybatisAnnotationSupport());
|
||
this.var_javax_swing_JCheckBox_c.setSelected(projectProfile.getSupportIncludeWithBinds());
|
||
this.d.setSelected(projectProfile.getAutoInjectPrefixAndSuffixForSqlTag());
|
||
k k2 = (k)((Object)ObjectUtils.tryCast((Object)this.var_javax_swing_JPanel_c, k.class));
|
||
k2.b(projectProfile.getMethodNameForProjectList());
|
||
d d2 = (d)((Object)ObjectUtils.tryCast((Object)this.var_javax_swing_JPanel_a, d.class));
|
||
d2.a(this.a(projectProfile));
|
||
}
|
||
|
||
private void b() {
|
||
this.var_javax_swing_JPanel_c = new k("Method name for genreate sql", this.var_com_intellij_openapi_project_Project_a, Lists.newArrayList(), Lists.newArrayList());
|
||
this.var_javax_swing_JComboBox_b = new ComboBox();
|
||
DatabaseEnums[] databaseEnumsArray = DatabaseEnums.values();
|
||
String[] stringArray = new String[databaseEnumsArray.length];
|
||
for (int i2 = 0; i2 < databaseEnumsArray.length; ++i2) {
|
||
stringArray[i2] = databaseEnumsArray[i2].name();
|
||
this.var_javax_swing_JComboBox_b.addItem(databaseEnumsArray[i2].name());
|
||
}
|
||
this.var_javax_swing_JComboBox_b.addItem("UNSET");
|
||
List<w> list = this.a(this.var_com_ccnode_codegenerator_myconfigurable_ProjectProfile_a);
|
||
this.var_javax_swing_JPanel_a = new d(this.var_com_intellij_openapi_project_Project_a, "set java method converter", list);
|
||
}
|
||
|
||
@NotNull
|
||
private List<w> a(ProjectProfile projectProfile) {
|
||
Map<String, String> map = projectProfile.getJavaMethodProfiles();
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
map.forEach(new BiConsumer<String, String>(){
|
||
final /* synthetic */ List var_java_util_List_a;
|
||
final /* synthetic */ c var_com_ccnode_codegenerator_I_c_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_I_c_a = c2;
|
||
this.var_java_util_List_a = list;
|
||
}
|
||
|
||
public void a(String string, String string2) {
|
||
w w2 = new w();
|
||
w2.a(string);
|
||
w2.b(string2);
|
||
this.var_java_util_List_a.add(w2);
|
||
}
|
||
|
||
@Override
|
||
public /* synthetic */ void accept(Object object, Object object2) {
|
||
this.a((String)object, (String)object2);
|
||
}
|
||
});
|
||
return arrayList;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.openapi.ui.ComboBox
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.ui.components.labels.LinkLabel
|
||
* com.intellij.ui.components.labels.LinkListener
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
*/
|
||
package com.ccnode.codegenerator.I;
|
||
|
||
import com.ccnode.codegenerator.ad.k;
|
||
import com.ccnode.codegenerator.b.a;
|
||
import com.ccnode.codegenerator.g.b;
|
||
import com.ccnode.codegenerator.myconfigurable.DatabaseEnums;
|
||
import com.ccnode.codegenerator.myconfigurable.PluginState;
|
||
import com.ccnode.codegenerator.myconfigurable.Profile;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.openapi.ui.ComboBox;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.ui.components.labels.LinkLabel;
|
||
import com.intellij.ui.components.labels.LinkListener;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.Color;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.lang.reflect.Method;
|
||
import java.util.ResourceBundle;
|
||
import javax.swing.AbstractButton;
|
||
import javax.swing.BorderFactory;
|
||
import javax.swing.DefaultComboBoxModel;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComboBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JTextField;
|
||
|
||
public class d {
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
private JComboBox var_javax_swing_JComboBox_c;
|
||
private JCheckBox var_javax_swing_JCheckBox_l;
|
||
private JCheckBox m;
|
||
private JComboBox var_javax_swing_JComboBox_d;
|
||
private JTextField var_javax_swing_JTextField_g;
|
||
private JButton var_javax_swing_JButton_b;
|
||
private JPanel var_javax_swing_JPanel_d;
|
||
private JCheckBox n;
|
||
private JCheckBox o;
|
||
private JCheckBox p;
|
||
private JCheckBox q;
|
||
private JTextField var_javax_swing_JTextField_h;
|
||
private JCheckBox r;
|
||
private JCheckBox s;
|
||
public JTextField var_javax_swing_JTextField_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_a;
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JTextField var_javax_swing_JTextField_b;
|
||
private JCheckBox t;
|
||
private JTextField var_javax_swing_JTextField_i;
|
||
private JTextField var_javax_swing_JTextField_j;
|
||
private JTextField var_javax_swing_JTextField_k;
|
||
private JTextField var_javax_swing_JTextField_l;
|
||
public JTextField var_javax_swing_JTextField_c;
|
||
public JCheckBox var_javax_swing_JCheckBox_b;
|
||
public JTextField var_javax_swing_JTextField_d;
|
||
public JCheckBox var_javax_swing_JCheckBox_c;
|
||
public JCheckBox var_javax_swing_JCheckBox_d;
|
||
public JCheckBox var_javax_swing_JCheckBox_e;
|
||
public JComboBox var_javax_swing_JComboBox_a;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_a;
|
||
public JCheckBox var_javax_swing_JCheckBox_f;
|
||
public JTextField var_javax_swing_JTextField_e;
|
||
public JCheckBox var_javax_swing_JCheckBox_g;
|
||
public JCheckBox var_javax_swing_JCheckBox_h;
|
||
public JPanel var_javax_swing_JPanel_b;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public JTextField var_javax_swing_JTextField_f;
|
||
public JCheckBox var_javax_swing_JCheckBox_i;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_b;
|
||
public JCheckBox var_javax_swing_JCheckBox_j;
|
||
public JComboBox var_javax_swing_JComboBox_b;
|
||
public LinkLabel var_com_intellij_ui_components_labels_LinkLabel_c;
|
||
public JCheckBox var_javax_swing_JCheckBox_k;
|
||
private PluginState var_com_ccnode_codegenerator_myconfigurable_PluginState_a;
|
||
private static Method var_java_lang_reflect_Method_a;
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JComboBox_d = new ComboBox();
|
||
com.ccnode.codegenerator.q.a[] aArray = com.ccnode.codegenerator.q.a.com_ccnode_codegenerator_q_a_arr_a();
|
||
for (com.ccnode.codegenerator.q.a a2 : aArray) {
|
||
this.var_javax_swing_JComboBox_d.addItem(a2.java_lang_String_a());
|
||
}
|
||
this.var_javax_swing_JComboBox_c = new ComboBox();
|
||
Enum[] enumArray = DatabaseEnums.values();
|
||
String[] stringArray = new String[enumArray.length];
|
||
for (int i2 = 0; i2 < enumArray.length; ++i2) {
|
||
stringArray[i2] = enumArray[i2].name();
|
||
this.var_javax_swing_JComboBox_c.addItem(enumArray[i2].name());
|
||
}
|
||
}
|
||
|
||
public d(PluginState pluginState) {
|
||
this.b();
|
||
this.var_javax_swing_JComboBox_a.addItem("Plugin formatter");
|
||
this.var_javax_swing_JComboBox_a.addItem("IDEA default formatter");
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://github.com/gejun123456/MyBatisCodeHelper-Pro/issues");
|
||
}
|
||
}, null);
|
||
com.ccnode.codegenerator.ah.a.b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
this.var_javax_swing_JTextField_g.setEditable(false);
|
||
this.a(b2);
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
a a2 = new a(null);
|
||
boolean bl = a2.showAndGet();
|
||
com.ccnode.codegenerator.ah.a.b b2 = com.ccnode.codegenerator.ah.a.a.com_ccnode_codegenerator_ah_a_b_a();
|
||
d.this.a(b2);
|
||
d.this.var_javax_swing_JPanel_d.revalidate();
|
||
d.this.var_javax_swing_JPanel_d.repaint();
|
||
}
|
||
});
|
||
boolean bl = com.ccnode.codegenerator.g.b.a();
|
||
if (!bl) {
|
||
this.var_javax_swing_JButton_a.setVisible(false);
|
||
}
|
||
if (bl) {
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
Messages.showInfoMessage((String)"Please configure dialect in Settings->Languages & Frameworks->SQL Dialects\n<><6E><D6><D0>: <20><>Ҫ<E8><D2AA><C5>÷<D6><C3B7><BD> <20><><C9><E8>-><3E><><D3>ԺͿ<D4BA><CDBF><F2>->SQL<51><4C><B7><BD> <20><><C5><E4><D6><C3>Ŀ<EE>ķ<B5><C4B7>Ժ<D1>xml<6D><6C><BB>д<D3><D0B4><FA><C2><EB>ʾ<E1>ͼ<BA><CDBC><EC>\n", (String)"Info");
|
||
}
|
||
});
|
||
}
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_b.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://github.com/mybatis/mybatis-3/pull/1487");
|
||
}
|
||
}, null);
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_c.setListener(new LinkListener(){
|
||
|
||
public void linkSelected(LinkLabel linkLabel, Object object) {
|
||
BrowserUtil.browse((String)"https://plugins.jetbrains.com/plugin/13710-chinese-simplified-language-pack----");
|
||
}
|
||
}, null);
|
||
this.b(pluginState);
|
||
}
|
||
|
||
private void a(com.ccnode.codegenerator.ah.a.b b2) {
|
||
if (b2.java_lang_Boolean_a().booleanValue()) {
|
||
this.var_javax_swing_JTextField_g.setForeground(new Color(46, 204, 113));
|
||
this.var_javax_swing_JTextField_g.setText(com.ccnode.codegenerator.ad.k.h(b2.java_util_Date_a()));
|
||
} else {
|
||
this.var_javax_swing_JTextField_g.setForeground(Color.RED);
|
||
this.var_javax_swing_JTextField_g.setText("not activated yet");
|
||
}
|
||
}
|
||
|
||
private void b(PluginState pluginState) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_PluginState_a = pluginState;
|
||
Profile profile = pluginState.getDefaultProfile();
|
||
this.a(profile);
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_c;
|
||
}
|
||
|
||
public void void_a(PluginState pluginState) {
|
||
this.var_com_ccnode_codegenerator_myconfigurable_PluginState_a = pluginState;
|
||
this.a(pluginState.getDefaultProfile());
|
||
}
|
||
|
||
public void a(Profile profile) {
|
||
this.var_javax_swing_JCheckBox_l.setSelected(profile.getGenerateMethodInServiceInterface());
|
||
this.m.setSelected(profile.getGenerateMethodInService());
|
||
this.var_javax_swing_JComboBox_d.setSelectedItem(profile.getIconName());
|
||
this.var_javax_swing_JComboBox_c.setSelectedItem(profile.getDatabase());
|
||
this.n.setSelected(profile.getUsejava8LocalDateTimeEct());
|
||
this.o.setSelected(profile.getConvertByteOrShortToInt());
|
||
this.p.setSelected(profile.getIfTestStringNullAndEmpty());
|
||
this.q.setSelected(profile.getDisableCompleteWithJdbcType());
|
||
this.var_javax_swing_JTextField_h.setText(profile.getMybatisGeneratorModelSuffix());
|
||
this.r.setSelected(profile.getFoldGeneratedMethod());
|
||
this.s.setSelected(profile.getUseActualParamNames());
|
||
this.var_javax_swing_JCheckBox_i.setSelected(profile.getOgnlSingleParamAnyName());
|
||
this.var_javax_swing_JTextField_a.setText(profile.getSkipParameterTypes());
|
||
this.var_javax_swing_JTextField_c.setText(profile.getSkipParamForAnalyze());
|
||
this.var_javax_swing_JCheckBox_a.setSelected(profile.getDelimeteAllColumn());
|
||
this.var_javax_swing_JTextField_b.setText(profile.getMethodNameSqlCommment());
|
||
this.t.setSelected(profile.getUseNewIndex());
|
||
this.var_javax_swing_JCheckBox_k.setSelected(profile.getSupportIncludeWithProperty());
|
||
this.var_javax_swing_JCheckBox_j.setSelected(profile.getUseXmlParameterTypeAsParameterTypeIfExtends());
|
||
this.var_javax_swing_JTextField_i.setText(profile.getSelectMethodNameText());
|
||
this.var_javax_swing_JTextField_j.setText(profile.getInsertMethodNameText());
|
||
this.var_javax_swing_JTextField_k.setText(profile.getUpdateMethodNameText());
|
||
this.var_javax_swing_JTextField_l.setText(profile.getDeleteMethodNameText());
|
||
this.var_javax_swing_JCheckBox_b.setSelected(profile.getIfTestSameLine());
|
||
this.var_javax_swing_JTextField_d.setText(String.valueOf(profile.getIfTestSamelineLength()));
|
||
this.var_javax_swing_JCheckBox_c.setSelected(profile.getForeachNoLineBreak());
|
||
this.var_javax_swing_JCheckBox_d.setSelected(profile.getSearchFieldReference());
|
||
this.var_javax_swing_JCheckBox_e.setSelected(profile.getDisableParamIndexCompletion());
|
||
this.var_javax_swing_JComboBox_a.setSelectedItem(profile.getUseformatter());
|
||
this.var_javax_swing_JComboBox_b.setSelectedItem(profile.getCurrentLocale());
|
||
this.var_javax_swing_JCheckBox_f.setSelected(profile.getDontCheckResultMap());
|
||
this.var_javax_swing_JTextField_e.setText(String.valueOf(profile.getParsingMaxLevel()));
|
||
this.var_javax_swing_JTextField_f.setText(String.valueOf(profile.getMaxParsingXmlTextLength()));
|
||
this.var_javax_swing_JCheckBox_g.setSelected(profile.getChangeJavaIcon());
|
||
this.var_javax_swing_JCheckBox_h.setSelected(profile.getChangeXmlIcon());
|
||
}
|
||
|
||
public boolean boolean_a(PluginState pluginState) {
|
||
this.b(this.var_com_ccnode_codegenerator_myconfigurable_PluginState_a.getDefaultProfile());
|
||
return !this.var_com_ccnode_codegenerator_myconfigurable_PluginState_a.equals(pluginState);
|
||
}
|
||
|
||
public PluginState com_ccnode_codegenerator_myconfigurable_PluginState_a() {
|
||
this.b(this.var_com_ccnode_codegenerator_myconfigurable_PluginState_a.getDefaultProfile());
|
||
return this.var_com_ccnode_codegenerator_myconfigurable_PluginState_a;
|
||
}
|
||
|
||
private void b(Profile profile) {
|
||
profile.setGenerateMethodInServiceInterface(this.var_javax_swing_JCheckBox_l.isSelected());
|
||
profile.setGenerateMethodInService(this.m.isSelected());
|
||
String string = (String)this.var_javax_swing_JComboBox_d.getSelectedItem();
|
||
profile.setIconName(string);
|
||
Object object = this.var_javax_swing_JComboBox_c.getSelectedItem();
|
||
profile.setDatabase((String)object);
|
||
profile.setUsejava8LocalDateTimeEct(this.n.isSelected());
|
||
profile.setConvertByteOrShortToInt(this.o.isSelected());
|
||
profile.setIfTestStringNullAndEmpty(this.p.isSelected());
|
||
profile.setDisableCompleteWithJdbcType(this.q.isSelected());
|
||
profile.setCurrentLocale((String)this.var_javax_swing_JComboBox_b.getSelectedItem());
|
||
profile.setMybatisGeneratorModelSuffix(this.var_javax_swing_JTextField_h.getText());
|
||
profile.setFoldGeneratedMethod(this.r.isSelected());
|
||
profile.setUseActualParamNames(this.s.isSelected());
|
||
profile.setOgnlSingleParamAnyName(this.var_javax_swing_JCheckBox_i.isSelected());
|
||
profile.setSkipParameterTypes(this.var_javax_swing_JTextField_a.getText());
|
||
profile.setSkipParamForAnalyze(this.var_javax_swing_JTextField_c.getText());
|
||
profile.setDelimeteAllColumn(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
profile.setMethodNameSqlCommment(this.var_javax_swing_JTextField_b.getText());
|
||
profile.setUseNewIndex(this.t.isSelected());
|
||
profile.setSupportIncludeWithProperty(this.var_javax_swing_JCheckBox_k.isSelected());
|
||
profile.setSelectMethodNameText(this.var_javax_swing_JTextField_i.getText());
|
||
profile.setInsertMethodNameText(this.var_javax_swing_JTextField_j.getText());
|
||
profile.setUpdateMethodNameText(this.var_javax_swing_JTextField_k.getText());
|
||
profile.setDeleteMethodNameText(this.var_javax_swing_JTextField_l.getText());
|
||
profile.setIfTestSameLine(this.var_javax_swing_JCheckBox_b.isSelected());
|
||
profile.setIfTestSamelineLength(Integer.valueOf(this.var_javax_swing_JTextField_d.getText()));
|
||
profile.setForeachNoLineBreak(this.var_javax_swing_JCheckBox_c.isSelected());
|
||
profile.setSearchFieldReference(this.var_javax_swing_JCheckBox_d.isSelected());
|
||
profile.setDisableParamIndexCompletion(this.var_javax_swing_JCheckBox_e.isSelected());
|
||
profile.setUseformatter((String)this.var_javax_swing_JComboBox_a.getSelectedItem());
|
||
profile.setDontCheckResultMap(this.var_javax_swing_JCheckBox_f.isSelected());
|
||
profile.setParsingMaxLevel(Integer.valueOf(this.var_javax_swing_JTextField_e.getText()));
|
||
profile.setMaxParsingXmlTextLength(Integer.valueOf(this.var_javax_swing_JTextField_f.getText()));
|
||
profile.setChangeJavaIcon(this.var_javax_swing_JCheckBox_g.isSelected());
|
||
profile.setChangeXmlIcon(this.var_javax_swing_JCheckBox_h.isSelected());
|
||
profile.setUseXmlParameterTypeAsParameterTypeIfExtends(this.var_javax_swing_JCheckBox_j.isSelected());
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_c = new JPanel();
|
||
this.var_javax_swing_JPanel_c.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(14, 7, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_c.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(0, 0, 1, 6, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel = new JLabel();
|
||
this.a(jLabel, this.a("i18n/i18n", "database"));
|
||
jPanel2.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_c.setEnabled(true);
|
||
jPanel2.add((Component)this.var_javax_swing_JComboBox_c, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel2.add((Component)spacer, new GridConstraints(0, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.a(this.var_javax_swing_JButton_a, this.a("i18n/i18n", "configuredialectforxml"));
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 2, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer2 = new Spacer();
|
||
jPanel.add((Component)spacer2, new GridConstraints(13, 6, 1, 1, 0, 2, 1, 4, null, null, null, 0, false));
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel3, new GridConstraints(2, 0, 1, 6, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel3.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "methodnamegeneratesql"), 0, 0, null, null));
|
||
this.var_javax_swing_JCheckBox_l = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_l, this.a("i18n/i18n", "generate.method.xml.in.service.interface"));
|
||
jPanel3.add((Component)this.var_javax_swing_JCheckBox_l, new GridConstraints(0, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.m = new JCheckBox();
|
||
this.a(this.m, this.a("i18n/i18n", "generate.method.xml.in.service"));
|
||
jPanel3.add((Component)this.m, new GridConstraints(1, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
this.a(jLabel2, this.a("i18n/i18n", "methodNameSqlComment"));
|
||
jPanel3.add((Component)jLabel2, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_b = new JTextField();
|
||
this.var_javax_swing_JTextField_b.setText("");
|
||
jPanel3.add((Component)this.var_javax_swing_JTextField_b, new GridConstraints(3, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JCheckBox_f = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_f, this.a("i18n/i18n", "ignoreresultmapcheck"));
|
||
jPanel3.add((Component)this.var_javax_swing_JCheckBox_f, new GridConstraints(2, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_d = new JPanel();
|
||
this.var_javax_swing_JPanel_d.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_d, new GridConstraints(12, 0, 1, 6, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel3 = new JLabel();
|
||
this.a(jLabel3, this.a("i18n/i18n", "expiredate"));
|
||
this.var_javax_swing_JPanel_d.add((Component)jLabel3, new GridConstraints(0, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
Spacer spacer3 = new Spacer();
|
||
this.var_javax_swing_JPanel_d.add((Component)spacer3, new GridConstraints(0, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_g = new JTextField();
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JTextField_g, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.a(this.var_javax_swing_JButton_b, this.a("i18n/i18n", "activation"));
|
||
this.var_javax_swing_JPanel_d.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(0, 0, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(2, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel4, new GridConstraints(10, 0, 1, 6, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
jLabel4.setText("mapper icon");
|
||
jPanel4.add((Component)jLabel4, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
jPanel4.add((Component)this.var_javax_swing_JComboBox_d, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel4.add((Component)this.var_javax_swing_JPanel_b, new GridConstraints(1, 0, 1, 4, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_g = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_g, this.a("i18n/i18n", "changejavaicon"));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JCheckBox_g, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer4 = new Spacer();
|
||
this.var_javax_swing_JPanel_b.add((Component)spacer4, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_h = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_h, this.a("i18n/i18n", "changexmlicon"));
|
||
this.var_javax_swing_JPanel_b.add((Component)this.var_javax_swing_JCheckBox_h, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer5 = new Spacer();
|
||
jPanel4.add((Component)spacer5, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout((LayoutManager)new GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel5, new GridConstraints(3, 0, 1, 6, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel5.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "databasegeneratecrud"), 0, 0, null, null));
|
||
this.n = new JCheckBox();
|
||
this.a(this.n, this.a("i18n/i18n", "usejava8localdatetimeect"));
|
||
jPanel5.add((Component)this.n, new GridConstraints(0, 0, 1, 3, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.o = new JCheckBox();
|
||
this.a(this.o, this.a("i18n/i18n", "useintegerinsteadofbyteandshort"));
|
||
jPanel5.add((Component)this.o, new GridConstraints(1, 0, 1, 4, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer6 = new Spacer();
|
||
jPanel5.add((Component)spacer6, new GridConstraints(0, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel5 = new JLabel();
|
||
this.a(jLabel5, this.a("i18n/i18n", "model.suffix"));
|
||
jPanel5.add((Component)jLabel5, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_h = new JTextField();
|
||
jPanel5.add((Component)this.var_javax_swing_JTextField_h, new GridConstraints(2, 1, 1, 2, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel6 = new JPanel();
|
||
jPanel6.setLayout((LayoutManager)new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel6, new GridConstraints(4, 0, 1, 5, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel6.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "completion"), 0, 0, null, null));
|
||
this.q = new JCheckBox();
|
||
this.a(this.q, this.a("i18n/i18n", "disable.complete.with.jdbc.type"));
|
||
jPanel6.add((Component)this.q, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer7 = new Spacer();
|
||
jPanel6.add((Component)spacer7, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_e = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_e, this.a("i18n/i18n", "paramindexcompletion"));
|
||
jPanel6.add((Component)this.var_javax_swing_JCheckBox_e, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_k = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_k, this.a("i18n/i18n", "support.include.with.property"));
|
||
jPanel6.add((Component)this.var_javax_swing_JCheckBox_k, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel7 = new JPanel();
|
||
jPanel7.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel7, new GridConstraints(8, 0, 1, 5, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel7.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "fold"), 0, 0, null, null));
|
||
this.r = new JCheckBox();
|
||
this.a(this.r, this.a("i18n/i18n", "foldgeneratedmethod"));
|
||
jPanel7.add((Component)this.r, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer8 = new Spacer();
|
||
jPanel7.add((Component)spacer8, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JPanel jPanel8 = new JPanel();
|
||
jPanel8.setLayout((LayoutManager)new GridLayoutManager(6, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel8, new GridConstraints(1, 0, 1, 6, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel8.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "common"), 0, 0, null, null));
|
||
this.p = new JCheckBox();
|
||
this.a(this.p, this.a("i18n/i18n", "if.test.string.null.and.empty"));
|
||
jPanel8.add((Component)this.p, new GridConstraints(0, 0, 1, 4, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.s = new JCheckBox();
|
||
this.a(this.s, this.a("i18n/i18n", "java8.useactualparamname.need.add.parameters.to.compiler"));
|
||
this.s.setToolTipText(this.a("i18n/i18n", "make.sure.add.parameters.to.compiler"));
|
||
jPanel8.add((Component)this.s, new GridConstraints(1, 0, 1, 4, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_a = new JTextField();
|
||
jPanel8.add((Component)this.var_javax_swing_JTextField_a, new GridConstraints(3, 1, 1, 3, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel8.add((Component)this.var_javax_swing_JPanel_a, new GridConstraints(5, 0, 1, 4, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_a = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_a, this.a("i18n/i18n", "escape.all.column.and.table.name.add.quote.to.column.name.ect"));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JCheckBox_a, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer9 = new Spacer();
|
||
this.var_javax_swing_JPanel_a.add((Component)spacer9, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel6 = new JLabel();
|
||
this.a(jLabel6, this.a("i18n/i18n", "skip.parameter.type"));
|
||
jPanel8.add((Component)jLabel6, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel7 = new JLabel();
|
||
this.a(jLabel7, this.a("i18n/i18n", "skip.paramter.type.when.analyze"));
|
||
jPanel8.add((Component)jLabel7, new GridConstraints(4, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_c = new JTextField();
|
||
jPanel8.add((Component)this.var_javax_swing_JTextField_c, new GridConstraints(4, 1, 1, 3, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JCheckBox_i = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_i, this.a("i18n/i18n", "ognlCheckOver352"));
|
||
jPanel8.add((Component)this.var_javax_swing_JCheckBox_i, new GridConstraints(2, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_b = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_b, this.a("i18n/i18n", "what.is.this"));
|
||
jPanel8.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_b, new GridConstraints(2, 2, 1, 1, 8, 0, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel9 = new JPanel();
|
||
jPanel9.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel9, new GridConstraints(9, 0, 1, 5, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel9.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "expriment"), 0, 0, null, null));
|
||
this.t = new JCheckBox();
|
||
this.a(this.t, this.a("i18n/i18n", "useNewIndex"));
|
||
jPanel9.add((Component)this.t, new GridConstraints(0, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer10 = new Spacer();
|
||
jPanel9.add((Component)spacer10, new GridConstraints(0, 1, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JCheckBox_j = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_j, this.a("i18n/i18n", "useparameterType"));
|
||
jPanel9.add((Component)this.var_javax_swing_JCheckBox_j, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JPanel jPanel10 = new JPanel();
|
||
jPanel10.setLayout((LayoutManager)new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel10, new GridConstraints(5, 0, 1, 5, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel10.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "defaultxmltagformethodname"), 0, 0, null, null));
|
||
JLabel jLabel8 = new JLabel();
|
||
jLabel8.setText("select");
|
||
jPanel10.add((Component)jLabel8, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_i = new JTextField();
|
||
jPanel10.add((Component)this.var_javax_swing_JTextField_i, new GridConstraints(0, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel9 = new JLabel();
|
||
jLabel9.setText("insert");
|
||
jPanel10.add((Component)jLabel9, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_j = new JTextField();
|
||
jPanel10.add((Component)this.var_javax_swing_JTextField_j, new GridConstraints(1, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel10 = new JLabel();
|
||
jLabel10.setText("update");
|
||
jPanel10.add((Component)jLabel10, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JLabel jLabel11 = new JLabel();
|
||
jLabel11.setText("delete");
|
||
jPanel10.add((Component)jLabel11, new GridConstraints(3, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_k = new JTextField();
|
||
jPanel10.add((Component)this.var_javax_swing_JTextField_k, new GridConstraints(2, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JTextField_l = new JTextField();
|
||
jPanel10.add((Component)this.var_javax_swing_JTextField_l, new GridConstraints(3, 1, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JPanel jPanel11 = new JPanel();
|
||
jPanel11.setLayout((LayoutManager)new GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel11, new GridConstraints(6, 0, 1, 5, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel11.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "formatter"), 0, 0, null, null));
|
||
this.var_javax_swing_JCheckBox_b = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_b, this.a("i18n/i18n", "iftestsameline"));
|
||
jPanel11.add((Component)this.var_javax_swing_JCheckBox_b, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer11 = new Spacer();
|
||
jPanel11.add((Component)spacer11, new GridConstraints(1, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel12 = new JLabel();
|
||
this.a(jLabel12, this.a("i18n/i18n", "iftestsamelinewordmaxlength"));
|
||
jPanel11.add((Component)jLabel12, new GridConstraints(1, 1, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_d = new JTextField();
|
||
jPanel11.add((Component)this.var_javax_swing_JTextField_d, new GridConstraints(1, 2, 1, 1, 8, 1, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
this.var_javax_swing_JCheckBox_c = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_c, this.a("i18n/i18n", "foreach.not.insert.new.line"));
|
||
jPanel11.add((Component)this.var_javax_swing_JCheckBox_c, new GridConstraints(2, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel13 = new JLabel();
|
||
this.a(jLabel13, this.a("i18n/i18n", "formatter1"));
|
||
jPanel11.add((Component)jLabel13, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_a = new JComboBox();
|
||
jPanel11.add((Component)this.var_javax_swing_JComboBox_a, new GridConstraints(0, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_a = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_a, this.a("i18n/i18n", "report.format.problem"));
|
||
jPanel11.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_a, new GridConstraints(0, 2, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel12 = new JPanel();
|
||
jPanel12.setLayout((LayoutManager)new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel12, new GridConstraints(7, 0, 1, 5, 0, 3, 3, 3, null, null, null, 0, false));
|
||
jPanel12.setBorder(BorderFactory.createTitledBorder(null, this.a("i18n/i18n", "performance"), 0, 0, null, null));
|
||
this.var_javax_swing_JCheckBox_d = new JCheckBox();
|
||
this.a(this.var_javax_swing_JCheckBox_d, this.a("i18n/i18n", "search.field.reference"));
|
||
jPanel12.add((Component)this.var_javax_swing_JCheckBox_d, new GridConstraints(0, 0, 1, 2, 8, 0, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer12 = new Spacer();
|
||
jPanel12.add((Component)spacer12, new GridConstraints(0, 2, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
JLabel jLabel14 = new JLabel();
|
||
this.a(jLabel14, this.a("i18n/i18n", "dynamic.sql.parsing.max.level"));
|
||
jPanel12.add((Component)jLabel14, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_e = new JTextField();
|
||
jPanel12.add((Component)this.var_javax_swing_JTextField_e, new GridConstraints(1, 1, 1, 1, 8, 0, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel15 = new JLabel();
|
||
this.a(jLabel15, this.a("i18n/i18n", "max.parsing.xml.text.length"));
|
||
jPanel12.add((Component)jLabel15, new GridConstraints(2, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextField_f = new JTextField();
|
||
jPanel12.add((Component)this.var_javax_swing_JTextField_f, new GridConstraints(2, 1, 1, 1, 8, 0, 4, 0, null, new Dimension(150, -1), null, 0, false));
|
||
JLabel jLabel16 = new JLabel();
|
||
this.a(jLabel16, this.a("i18n/i18n", "locale2"));
|
||
jPanel.add((Component)jLabel16, new GridConstraints(11, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JComboBox_b = new JComboBox();
|
||
DefaultComboBoxModel<String> defaultComboBoxModel = new DefaultComboBoxModel<String>();
|
||
defaultComboBoxModel.addElement("DEFAULT");
|
||
defaultComboBoxModel.addElement("<22><><D6><D0>");
|
||
defaultComboBoxModel.addElement("English");
|
||
this.var_javax_swing_JComboBox_b.setModel(defaultComboBoxModel);
|
||
jPanel.add((Component)this.var_javax_swing_JComboBox_b, new GridConstraints(11, 1, 1, 1, 8, 1, 2, 0, null, null, null, 0, false));
|
||
Spacer spacer13 = new Spacer();
|
||
jPanel.add((Component)spacer13, new GridConstraints(11, 3, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_com_intellij_ui_components_labels_LinkLabel_c = new LinkLabel();
|
||
this.a((JLabel)this.var_com_intellij_ui_components_labels_LinkLabel_c, this.a("i18n/i18n", "not.work"));
|
||
jPanel.add((Component)this.var_com_intellij_ui_components_labels_LinkLabel_c, new GridConstraints(11, 2, 1, 1, 8, 0, 3, 3, null, null, null, 0, false));
|
||
jLabel5.setLabelFor(this.var_javax_swing_JTextField_h);
|
||
}
|
||
|
||
private String a(String string, String string2) {
|
||
ResourceBundle resourceBundle;
|
||
try {
|
||
Class<?> clazz = this.getClass();
|
||
if (var_java_lang_reflect_Method_a == null) {
|
||
Class<?> clazz2 = clazz.getClassLoader().loadClass("com.ccnode.codegenerator.bundle.MyBundle");
|
||
var_java_lang_reflect_Method_a = clazz2.getMethod("getBundle", String.class, Class.class);
|
||
}
|
||
resourceBundle = (ResourceBundle)var_java_lang_reflect_Method_a.invoke(null, string, clazz);
|
||
}
|
||
catch (Exception exception) {
|
||
resourceBundle = ResourceBundle.getBundle(string);
|
||
}
|
||
return resourceBundle.getString(string2);
|
||
}
|
||
|
||
private void a(JLabel jLabel, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
jLabel.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
jLabel.setDisplayedMnemonic(c2);
|
||
jLabel.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
private void a(AbstractButton abstractButton, String string) {
|
||
StringBuffer stringBuffer = new StringBuffer();
|
||
boolean bl = false;
|
||
char c2 = '\u0000';
|
||
int n2 = -1;
|
||
for (int i2 = 0; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) == '&') {
|
||
if (++i2 == string.length()) break;
|
||
if (!bl && string.charAt(i2) != '&') {
|
||
bl = true;
|
||
c2 = string.charAt(i2);
|
||
n2 = stringBuffer.length();
|
||
}
|
||
}
|
||
stringBuffer.append(string.charAt(i2));
|
||
}
|
||
abstractButton.setText(stringBuffer.toString());
|
||
if (bl) {
|
||
abstractButton.setMnemonic(c2);
|
||
abstractButton.setDisplayedMnemonicIndex(n2);
|
||
}
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_c;
|
||
}
|
||
|
||
static {
|
||
var_java_lang_reflect_Method_a = null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$General
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.ui.DialogBuilder
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import cn.com.pism.batslog.e.i;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.ui.DialogBuilder;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class a
|
||
extends b {
|
||
public a(JPanel jPanel) {
|
||
super("Config", "Config", AllIcons.General.Settings);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
DialogBuilder dialogBuilder = new DialogBuilder(anActionEvent.getProject());
|
||
dialogBuilder.setTitle("Mybatis Log Setting");
|
||
JComponent jComponent = new i(anActionEvent.getProject()).javax_swing_JComponent_a();
|
||
dialogBuilder.setCenterPanel(jComponent);
|
||
dialogBuilder.addCloseButton();
|
||
dialogBuilder.show();
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(true);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.ccnode.codegenerator.M.a.a;
|
||
import com.ccnode.codegenerator.ad.G;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.m.b_0;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import java.util.ArrayList;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b
|
||
extends com.ccnode.codegenerator.a.a {
|
||
private JTextArea a;
|
||
|
||
public b(JTextArea jTextArea) {
|
||
super("Convert Text to sql", "Convert text to sql", p.a());
|
||
this.a = jTextArea;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
b.a(this.a, anActionEvent.getProject());
|
||
}
|
||
|
||
public static void a(String string, String string2, Project project) {
|
||
String string3 = G.a(string, string2);
|
||
b_0.a(project, string3, com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(project));
|
||
}
|
||
|
||
public static void a(JTextArea jTextArea, Project project) {
|
||
Project project2 = project;
|
||
if (jTextArea.getText().isEmpty()) {
|
||
Messages.showErrorDialog((Project)project2, (String)"Text is empty", (String)"Text Empty");
|
||
return;
|
||
}
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project2);
|
||
String string = jTextArea.getText();
|
||
String string2 = mybatisCodeHelperLogSettingState.getSqlPrefix();
|
||
String string3 = mybatisCodeHelperLogSettingState.getParamsPrefix();
|
||
if (string.contains(string2) && string.contains(string3)) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
String[] stringArray = string.split("\n");
|
||
if (stringArray != null && stringArray.length >= 2) {
|
||
String string4 = "";
|
||
b_0 b_02 = new b_0(project2);
|
||
b_02.a();
|
||
for (int i2 = 0; i2 < stringArray.length; ++i2) {
|
||
String string5 = stringArray[i2];
|
||
b_02.a(string5 + "\n", stringArray.length, arrayList, false);
|
||
}
|
||
b_02.a();
|
||
if (arrayList.size() == 0) {
|
||
Messages.showErrorDialog((Project)project2, (String)"Cant extract from sql", (String)"Extract Sql Error");
|
||
} else {
|
||
b_0.a(project2, Joiner.on((String)"\n\n").join((Iterable)arrayList), com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(project2));
|
||
}
|
||
} else {
|
||
Messages.showErrorDialog((Project)project2, (String)"Cant extract from sql", (String)"Extract Sql Error");
|
||
}
|
||
} else {
|
||
Messages.showErrorDialog((Project)project2, (String)"Cant extract from sql", (String)"Extract Sql Error");
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.ui.EditorTextField
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import com.ccnode.codegenerator.M.a.a;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.ccnode.codegenerator.m.b_0;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.ui.EditorTextField;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class c
|
||
extends b {
|
||
private EditorTextField a;
|
||
|
||
public c(EditorTextField editorTextField) {
|
||
super("Execute", "Execute sql", AllIcons.Actions.Execute);
|
||
this.a = editorTextField;
|
||
}
|
||
|
||
public c() {
|
||
super(AllIcons.Actions.Execute);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
String string = this.a.getText();
|
||
String string2 = c.a(this.a);
|
||
Project project = anActionEvent.getProject();
|
||
b_0.a(project, string2, com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(project));
|
||
}
|
||
|
||
@NotNull
|
||
public static String a(EditorTextField editorTextField) {
|
||
int n2;
|
||
int n3 = editorTextField.getCaretModel().getOffset();
|
||
String string = editorTextField.getDocument().getText();
|
||
int n4 = string.indexOf("/*", n3);
|
||
if (n4 == -1) {
|
||
n4 = string.length();
|
||
}
|
||
if ((n2 = string.substring(0, n3).lastIndexOf("/*")) == -1) {
|
||
n2 = 0;
|
||
}
|
||
String string2 = string.substring(n2, n4);
|
||
return string2;
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
String string = this.a.getText();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(false);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.codeInsight.CodeInsightUtil
|
||
* com.intellij.ide.BrowserUtil
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiMethod
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.xml.XmlAttribute
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.ui.EditorTextField
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import com.ccnode.codegenerator.a.a;
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.o.c_0;
|
||
import com.intellij.codeInsight.CodeInsightUtil;
|
||
import com.intellij.ide.BrowserUtil;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiMethod;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.xml.XmlAttribute;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.ui.EditorTextField;
|
||
import java.util.List;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class d
|
||
extends a {
|
||
private EditorTextField a;
|
||
|
||
public d(EditorTextField editorTextField) {
|
||
super("Jump to xml", "Jump to xml action", p.b());
|
||
this.a = editorTextField;
|
||
}
|
||
|
||
public d() {
|
||
super("Jump to xml", "Jump to xml action", null);
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
String string = this.a.getText();
|
||
Project project = anActionEvent.getProject();
|
||
String string2 = d.a(this.a);
|
||
if (StringUtils.isBlank((CharSequence)string2)) {
|
||
Messages.showErrorDialog((Project)project, (String)("can not find mapper name, mapper name is:" + string2), (String)"error");
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/sqlLog");
|
||
return;
|
||
}
|
||
int n2 = string2.lastIndexOf(".");
|
||
String string3 = string2.substring(0, n2);
|
||
String string4 = string2.substring(n2 + 1);
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass(string3, GlobalSearchScope.allScope((Project)project));
|
||
if (psiClass == null) {
|
||
Messages.showErrorDialog((Project)project, (String)("can not find mapper class, mapper name is:" + string3), (String)"error");
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/sqlLog");
|
||
return;
|
||
}
|
||
PsiMethod[] psiMethodArray = psiClass.findMethodsByName(string4, false);
|
||
if (psiMethodArray.length == 0) {
|
||
List<XmlFile> list = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a((PsiElement)psiClass, project, string3);
|
||
if (list.size() == 0) {
|
||
Messages.showErrorDialog((Project)project, (String)("can not find mapper xml for method, mapper name is:" + string3 + " method name is:" + string4), (String)"error");
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/sqlLog");
|
||
return;
|
||
}
|
||
CodeInsightUtil.positionCursor((Project)project, (PsiFile)((PsiFile)list.get(0)), (PsiElement)((PsiElement)list.get(0)));
|
||
} else {
|
||
PsiMethod psiMethod;
|
||
PsiMethod psiMethod2 = psiMethod = psiMethodArray[0];
|
||
c_0 c_02 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(psiMethod, project, string3);
|
||
if (c_02.a().isEmpty()) {
|
||
Messages.showErrorDialog((Project)project, (String)("can not find mapper xml for method: mapper name is:" + string3 + " method name is:" + string4), (String)"error");
|
||
BrowserUtil.browse((String)"https://brucege.com/doc/#/sqlLog");
|
||
return;
|
||
}
|
||
XmlAttribute xmlAttribute = c_02.b().get(0);
|
||
CodeInsightUtil.positionCursor((Project)project, (PsiFile)xmlAttribute.getContainingFile(), (PsiElement)xmlAttribute);
|
||
}
|
||
}
|
||
|
||
@NotNull
|
||
public static String a(EditorTextField editorTextField) {
|
||
String string;
|
||
String[] stringArray;
|
||
int n2;
|
||
int n3 = editorTextField.getCaretModel().getOffset();
|
||
String string2 = editorTextField.getDocument().getText();
|
||
int n4 = string2.indexOf("/*", n3);
|
||
if (n4 == -1) {
|
||
n4 = string2.length();
|
||
}
|
||
if ((n2 = string2.substring(0, n3).lastIndexOf("/*")) == -1) {
|
||
n2 = 0;
|
||
}
|
||
String string3 = string2.substring(n2, n4);
|
||
int n5 = string3.indexOf("*/");
|
||
String string4 = "";
|
||
if (n5 != -1 && (stringArray = (string4 = string3.substring(0, n5)).split(" ")).length > 0 && (string = stringArray[stringArray.length - 1]).contains(".")) {
|
||
return string.trim();
|
||
}
|
||
return "";
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
String string = this.a.getText();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(false);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import cn.com.pism.batslog.e.i;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import javax.swing.JComponent;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class e
|
||
extends DialogWrapper {
|
||
@Nullable
|
||
private final Project a;
|
||
|
||
protected e(@Nullable Project project, boolean bl) {
|
||
super(project, bl);
|
||
this.a = project;
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return new i(this.a).javax_swing_JComponent_a();
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
super.doOKAction();
|
||
}
|
||
|
||
protected void createDefaultActions() {
|
||
super.createDefaultActions();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.ide.CopyPasteManager
|
||
* com.intellij.openapi.ui.popup.JBPopupFactory
|
||
* com.intellij.ui.EditorTextField
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import com.ccnode.codegenerator.M.a.a.c;
|
||
import com.ccnode.codegenerator.a.b;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.ide.CopyPasteManager;
|
||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||
import com.intellij.ui.EditorTextField;
|
||
import java.awt.datatransfer.StringSelection;
|
||
import java.awt.datatransfer.Transferable;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class f
|
||
extends b {
|
||
private EditorTextField a;
|
||
|
||
public f(EditorTextField editorTextField) {
|
||
super("Copy Sql");
|
||
this.a = editorTextField;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
String string = c.a(this.a);
|
||
CopyPasteManager.getInstance().setContents((Transferable)new StringSelection(string));
|
||
JBPopupFactory.getInstance().createMessage("Copyed text:" + string).showInFocusCenter();
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
String string = this.a.getText();
|
||
if (StringUtils.isBlank((CharSequence)string)) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(false);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.actionSystem.ActionGroup
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.EditorSettings
|
||
* com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction
|
||
* com.intellij.openapi.editor.event.EditorMouseEvent
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.editor.ex.EditorPopupHandler
|
||
* com.intellij.openapi.editor.impl.ContextMenuPopupHandler
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.VerticalFlowLayout
|
||
* com.intellij.openapi.util.Pair
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.ui.EditorTextField
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import cn.com.pism.batslog.a.e;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.ccnode.codegenerator.M.a.a.a;
|
||
import com.ccnode.codegenerator.M.a.a.b;
|
||
import com.ccnode.codegenerator.M.a.a.c;
|
||
import com.ccnode.codegenerator.M.a.a.d;
|
||
import com.ccnode.codegenerator.M.a.a.f;
|
||
import com.ccnode.codegenerator.M.a.a.h;
|
||
import com.ccnode.codegenerator.M.a.a.j;
|
||
import com.ccnode.codegenerator.M.a.a.k;
|
||
import com.ccnode.codegenerator.ad.A;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.EditorSettings;
|
||
import com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction;
|
||
import com.intellij.openapi.editor.event.EditorMouseEvent;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.editor.ex.EditorPopupHandler;
|
||
import com.intellij.openapi.editor.impl.ContextMenuPopupHandler;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||
import com.intellij.openapi.util.Pair;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.ui.EditorTextField;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.ArrayList;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JLabel;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTabbedPane;
|
||
import javax.swing.JTextArea;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class g {
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private JPanel var_javax_swing_JPanel_c;
|
||
public EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
public JTabbedPane var_javax_swing_JTabbedPane_a;
|
||
public JTextArea var_javax_swing_JTextArea_a;
|
||
public JButton var_javax_swing_JButton_a;
|
||
public JButton var_javax_swing_JButton_b;
|
||
public JTextArea var_javax_swing_JTextArea_b;
|
||
public JTextArea var_javax_swing_JTextArea_c;
|
||
public JButton var_javax_swing_JButton_c;
|
||
public JButton d;
|
||
private PsiFile var_com_intellij_psi_PsiFile_a;
|
||
private Document var_com_intellij_openapi_editor_Document_a;
|
||
|
||
public g(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.b();
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_M_a_a_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_g_a = g2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
com.ccnode.codegenerator.M.a.a.b.a(this.var_com_ccnode_codegenerator_M_a_a_g_a.var_javax_swing_JTextArea_a, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_c.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_M_a_a_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_g_a = g2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
String string = this.var_com_ccnode_codegenerator_M_a_a_g_a.var_javax_swing_JTextArea_b.getText();
|
||
String string2 = this.var_com_ccnode_codegenerator_M_a_a_g_a.var_javax_swing_JTextArea_c.getText();
|
||
com.ccnode.codegenerator.M.a.a.b.a(string, string2, this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.d.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_M_a_a_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_g_a = g2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
new com.ccnode.codegenerator.ag.e.a(this.var_com_intellij_openapi_project_Project_a, "sql:\nINSERT INTO `admin` (admin_id,admin_name, admin_pwd, `status`, real_name, telephone, create_time, update_time, center_id, admin_type, myDate) VALUES (?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\nparameter:\n1(Integer), hello(String), passs(String), 0(Integer), good\n100(String), 11111111(String), 2022-11-23 12:44:22.158(Timestamp), 2022-11-23 12:44:22.158(Timestamp), 100(Integer), 2000(Integer), 2022-11-23 12:44:22.158(Timestamp)").show();
|
||
}
|
||
});
|
||
this.var_javax_swing_JButton_b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
g.this.var_javax_swing_JTextArea_a.setText("");
|
||
}
|
||
});
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(this.var_com_intellij_openapi_project_Project_a).a(this.var_javax_swing_JPanel_b);
|
||
com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(this.var_com_intellij_openapi_project_Project_a).a(this.var_com_intellij_ui_EditorTextField_a);
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
JPanel jPanel;
|
||
Document document;
|
||
PsiFile psiFile;
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new VerticalFlowLayout());
|
||
Pair<Language, FileType> pair = com.ccnode.codegenerator.g.b.a();
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile = PsiFileFactory.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).createFileFromText("mybatis.sql", (Language)pair.first, (CharSequence)"");
|
||
this.var_com_intellij_openapi_editor_Document_a = document = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDocument(psiFile);
|
||
this.var_com_intellij_ui_EditorTextField_a = new EditorTextField(document, this.var_com_intellij_openapi_project_Project_a, (FileType)pair.second){
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
editorEx.setHorizontalScrollbarVisible(true);
|
||
editorEx.setCaretEnabled(true);
|
||
editorEx.setCaretVisible(true);
|
||
EditorSettings editorSettings = editorEx.getSettings();
|
||
editorSettings.setLineNumbersShown(true);
|
||
editorEx.installPopupHandler((EditorPopupHandler)new ContextMenuPopupHandler(this, editorEx){
|
||
final /* synthetic */ EditorEx var_com_intellij_openapi_editor_ex_EditorEx_a;
|
||
final /* synthetic */ 5 var_com_ccnode_codegenerator_M_a_a_g$5_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_g$5_a = var1_1;
|
||
this.var_com_intellij_openapi_editor_ex_EditorEx_a = editorEx;
|
||
}
|
||
|
||
@Nullable
|
||
public ActionGroup getActionGroup(@NotNull EditorMouseEvent editorMouseEvent) {
|
||
return new ActionGroup(){
|
||
|
||
@NotNull
|
||
public AnAction[] getChildren(@Nullable AnActionEvent anActionEvent) {
|
||
c c2 = new c(var_com_ccnode_codegenerator_M_a_a_g$5_a.g.this.var_com_intellij_ui_EditorTextField_a);
|
||
f f2 = new f(var_com_ccnode_codegenerator_M_a_a_g$5_a.g.this.var_com_intellij_ui_EditorTextField_a);
|
||
j j2 = new j(var_com_ccnode_codegenerator_M_a_a_g$5_a.g.this.var_com_intellij_ui_EditorTextField_a);
|
||
d d2 = new d(var_com_ccnode_codegenerator_M_a_a_g$5_a.g.this.var_com_intellij_ui_EditorTextField_a);
|
||
k k2 = new k(var_com_ccnode_codegenerator_M_a_a_g$5_a.g.this.var_com_intellij_ui_EditorTextField_a);
|
||
ScrollToTheEndToolbarAction scrollToTheEndToolbarAction = new ScrollToTheEndToolbarAction((Editor)var_com_intellij_openapi_editor_ex_EditorEx_a);
|
||
ArrayList arrayList = Lists.newArrayList((Object[])new AnAction[]{c2, f2, d2, j2, k2, scrollToTheEndToolbarAction});
|
||
return arrayList.toArray(new AnAction[0]);
|
||
}
|
||
};
|
||
}
|
||
});
|
||
return editorEx;
|
||
}
|
||
};
|
||
this.var_com_intellij_ui_EditorTextField_a.setOneLineMode(false);
|
||
this.var_com_intellij_ui_EditorTextField_a.setAutoscrolls(true);
|
||
this.var_javax_swing_JPanel_c = jPanel = this.a(this.var_javax_swing_JPanel_b);
|
||
}
|
||
|
||
@NotNull
|
||
public JPanel a(JPanel jPanel) {
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout(new BorderLayout());
|
||
DefaultActionGroup defaultActionGroup = new DefaultActionGroup("MybatisCodeHelper.MybatisLogGroup", true);
|
||
defaultActionGroup.add((AnAction)new cn.com.pism.batslog.a.f());
|
||
defaultActionGroup.add((AnAction)new e(A.a("startConvertLogToSql")));
|
||
defaultActionGroup.add((AnAction)new k(this.var_com_intellij_ui_EditorTextField_a));
|
||
defaultActionGroup.add((AnAction)new a(jPanel));
|
||
defaultActionGroup.add((AnAction)new h(this.var_com_intellij_ui_EditorTextField_a));
|
||
ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("ListGroup", (ActionGroup)defaultActionGroup, true);
|
||
actionToolbar.setTargetComponent((JComponent)this.var_com_intellij_ui_EditorTextField_a);
|
||
actionToolbar.setLayoutPolicy(2);
|
||
JComponent jComponent = actionToolbar.getComponent();
|
||
jComponent.setBorder(null);
|
||
jComponent.setOpaque(false);
|
||
jPanel2.add((Component)jComponent, "Center");
|
||
JCheckBox jCheckBox = new JCheckBox(A.a("removeDuplicate"));
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(this.var_com_intellij_openapi_project_Project_a).getState();
|
||
jCheckBox.setSelected(mybatisCodeHelperLogSettingState.getRemoveDuplicateSql());
|
||
jCheckBox.addActionListener(new ActionListener(){
|
||
final /* synthetic */ MybatisCodeHelperLogSettingState var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a;
|
||
final /* synthetic */ JCheckBox var_javax_swing_JCheckBox_a;
|
||
final /* synthetic */ g var_com_ccnode_codegenerator_M_a_a_g_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_g_a = g2;
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a = mybatisCodeHelperLogSettingState;
|
||
this.var_javax_swing_JCheckBox_a = jCheckBox;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.setRemoveDuplicateSql(this.var_javax_swing_JCheckBox_a.isSelected());
|
||
cn.com.pism.batslog.f.a.var_int_b = 0;
|
||
}
|
||
});
|
||
jPanel2.add((Component)jCheckBox, "West");
|
||
return jPanel2;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JTabbedPane_a = new JTabbedPane();
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JTabbedPane_a, "Center");
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("Sql", jPanel);
|
||
jPanel.add((Component)this.var_javax_swing_JPanel_c, "North");
|
||
jPanel.add((Component)this.var_com_intellij_ui_EditorTextField_a, "Center");
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("Text to convert", jPanel2);
|
||
JPanel jPanel3 = new JPanel();
|
||
jPanel3.setLayout((LayoutManager)new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel2.add((Component)jPanel3, new GridConstraints(2, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.var_javax_swing_JButton_a.setText("Convert To Sql");
|
||
jPanel3.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel3.add((Component)spacer, new GridConstraints(0, 0, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_b = new JButton();
|
||
this.var_javax_swing_JButton_b.setText("Clear");
|
||
jPanel3.add((Component)this.var_javax_swing_JButton_b, new GridConstraints(0, 2, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel2.add((Component)jScrollPane, new GridConstraints(1, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTextArea_a);
|
||
JLabel jLabel = new JLabel();
|
||
jLabel.setText("mybatis log text containg Preparing and Parameters:");
|
||
jPanel2.add((Component)jLabel, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel4 = new JPanel();
|
||
jPanel4.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JTabbedPane_a.addTab("sql and parameter", jPanel4);
|
||
JPanel jPanel5 = new JPanel();
|
||
jPanel5.setLayout(new BorderLayout(0, 0));
|
||
jPanel4.add((Component)jPanel5, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JPanel jPanel6 = new JPanel();
|
||
jPanel6.setLayout((LayoutManager)new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel5.add((Component)jPanel6, "North");
|
||
this.d = new JButton();
|
||
this.d.setText("example");
|
||
jPanel6.add((Component)this.d, new GridConstraints(0, 1, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
JLabel jLabel2 = new JLabel();
|
||
jLabel2.setText("support multi line parameter");
|
||
jPanel6.add((Component)jLabel2, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
JPanel jPanel7 = new JPanel();
|
||
jPanel7.setLayout((LayoutManager)new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel5.add((Component)jPanel7, "Center");
|
||
JLabel jLabel3 = new JLabel();
|
||
jLabel3.setText("sql");
|
||
jPanel7.add((Component)jLabel3, new GridConstraints(0, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_b = new JTextArea();
|
||
jPanel7.add((Component)this.var_javax_swing_JTextArea_b, new GridConstraints(0, 1, 1, 1, 0, 3, 4, 4, null, new Dimension(150, 50), null, 0, false));
|
||
JLabel jLabel4 = new JLabel();
|
||
jLabel4.setText("parameter");
|
||
jPanel7.add((Component)jLabel4, new GridConstraints(1, 0, 1, 1, 8, 0, 0, 0, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_c = new JTextArea();
|
||
jPanel7.add((Component)this.var_javax_swing_JTextArea_c, new GridConstraints(1, 1, 1, 1, 0, 3, 4, 4, null, new Dimension(150, 50), null, 0, false));
|
||
this.var_javax_swing_JButton_c = new JButton();
|
||
this.var_javax_swing_JButton_c.setText("Convert");
|
||
jPanel4.add((Component)this.var_javax_swing_JButton_c, new GridConstraints(1, 0, 1, 1, 8, 0, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$RunConfigurations
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.ex.util.EditorUtil
|
||
* com.intellij.ui.EditorTextField
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import com.ccnode.codegenerator.a.a;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.ex.util.EditorUtil;
|
||
import com.intellij.ui.EditorTextField;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class h
|
||
extends a {
|
||
private EditorTextField a;
|
||
|
||
public h(EditorTextField editorTextField) {
|
||
super("Scroll To End", "Scroll To End", AllIcons.RunConfigurations.Scroll_down);
|
||
this.a = editorTextField;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
EditorUtil.scrollToTheEnd((Editor)this.a.getEditor());
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(true);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.actionSystem.ActionGroup
|
||
* com.intellij.openapi.actionSystem.ActionManager
|
||
* com.intellij.openapi.actionSystem.ActionToolbar
|
||
* com.intellij.openapi.actionSystem.AnAction
|
||
* com.intellij.openapi.actionSystem.DefaultActionGroup
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction
|
||
* com.intellij.openapi.editor.ex.EditorEx
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.Pair
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiFileFactory
|
||
* com.intellij.ui.EditorTextField
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import com.ccnode.codegenerator.M.a.a.c;
|
||
import com.ccnode.codegenerator.M.a.a.f;
|
||
import com.ccnode.codegenerator.g.b;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.actionSystem.ActionGroup;
|
||
import com.intellij.openapi.actionSystem.ActionManager;
|
||
import com.intellij.openapi.actionSystem.ActionToolbar;
|
||
import com.intellij.openapi.actionSystem.AnAction;
|
||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction;
|
||
import com.intellij.openapi.editor.ex.EditorEx;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.Pair;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiFileFactory;
|
||
import com.intellij.ui.EditorTextField;
|
||
import java.awt.BorderLayout;
|
||
import java.awt.Component;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
|
||
public class i {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
private JPanel var_javax_swing_JPanel_b;
|
||
private PsiFile var_com_intellij_psi_PsiFile_a;
|
||
private Project var_com_intellij_openapi_project_Project_a;
|
||
private String var_java_lang_String_a;
|
||
private String var_java_lang_String_b;
|
||
private Document var_com_intellij_openapi_editor_Document_a;
|
||
|
||
public i(Project project, String string, String string2) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_java_lang_String_b = string2;
|
||
this.b();
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_b;
|
||
}
|
||
|
||
public EditorTextField com_intellij_ui_EditorTextField_a() {
|
||
return this.var_com_intellij_ui_EditorTextField_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public PsiFile com_intellij_psi_PsiFile_a() {
|
||
return this.var_com_intellij_psi_PsiFile_a;
|
||
}
|
||
|
||
private void void_a() {
|
||
Document document;
|
||
PsiFile psiFile;
|
||
String string = "/* " + this.var_java_lang_String_a + " */\n" + this.var_java_lang_String_b;
|
||
Pair<Language, FileType> pair = com.ccnode.codegenerator.g.b.a();
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile = PsiFileFactory.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).createFileFromText("mybatis.sql", (Language)pair.first, (CharSequence)string);
|
||
this.var_com_intellij_openapi_editor_Document_a = document = PsiDocumentManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).getDocument(psiFile);
|
||
this.var_com_intellij_ui_EditorTextField_a = new EditorTextField(document, this.var_com_intellij_openapi_project_Project_a, (FileType)pair.second){
|
||
|
||
protected EditorEx createEditor() {
|
||
EditorEx editorEx = super.createEditor();
|
||
editorEx.setVerticalScrollbarVisible(true);
|
||
return editorEx;
|
||
}
|
||
};
|
||
this.var_com_intellij_ui_EditorTextField_a.setOneLineMode(false);
|
||
this.var_com_intellij_ui_EditorTextField_a.setAutoscrolls(true);
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout(new BorderLayout());
|
||
DefaultActionGroup defaultActionGroup = new DefaultActionGroup("MybatisCodeHelper.MybatisLogOneGroup", true);
|
||
defaultActionGroup.add((AnAction)new c(this.var_com_intellij_ui_EditorTextField_a));
|
||
defaultActionGroup.add((AnAction)new f(this.var_com_intellij_ui_EditorTextField_a));
|
||
defaultActionGroup.add((AnAction)new ScrollToTheEndToolbarAction(this.var_com_intellij_ui_EditorTextField_a.getEditor()));
|
||
ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("MybatisRunnerActions", (ActionGroup)defaultActionGroup, true);
|
||
actionToolbar.setTargetComponent((JComponent)this.var_com_intellij_ui_EditorTextField_a);
|
||
actionToolbar.setLayoutPolicy(2);
|
||
JComponent jComponent = actionToolbar.getComponent();
|
||
jComponent.setBorder(null);
|
||
jComponent.setOpaque(false);
|
||
this.var_javax_swing_JPanel_b.add((Component)jComponent, "Center");
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout(new BorderLayout(0, 0));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_com_intellij_ui_EditorTextField_a, "Center");
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JPanel_b, "South");
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.codeStyle.CodeStyleManager
|
||
* com.intellij.ui.EditorTextField
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import com.ccnode.codegenerator.a.a;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.codeStyle.CodeStyleManager;
|
||
import com.intellij.ui.EditorTextField;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class j
|
||
extends a {
|
||
private EditorTextField a;
|
||
|
||
public j(EditorTextField editorTextField) {
|
||
super("Reformat");
|
||
this.a = editorTextField;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
Document document = this.a.getDocument();
|
||
Project project = anActionEvent.getProject();
|
||
PsiFile psiFile = PsiDocumentManager.getInstance((Project)project).getPsiFile(document);
|
||
WriteCommandAction.runWriteCommandAction((Project)project, (Runnable)new Runnable(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ PsiFile var_com_intellij_psi_PsiFile_a;
|
||
final /* synthetic */ j var_com_ccnode_codegenerator_M_a_a_j_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_j_a = j2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
CodeStyleManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).reformat((PsiElement)this.var_com_intellij_psi_PsiFile_a);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.icons.AllIcons$Actions
|
||
* com.intellij.openapi.actionSystem.AnActionEvent
|
||
* com.intellij.ui.EditorTextField
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import cn.com.pism.batslog.f.a;
|
||
import com.intellij.icons.AllIcons;
|
||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||
import com.intellij.ui.EditorTextField;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class k
|
||
extends com.ccnode.codegenerator.a.a {
|
||
private EditorTextField a;
|
||
|
||
public k(EditorTextField editorTextField) {
|
||
super("Clear All", "Clear all sql", AllIcons.Actions.GC);
|
||
this.a = editorTextField;
|
||
}
|
||
|
||
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
|
||
this.a.setText("");
|
||
cn.com.pism.batslog.f.a.var_int_a = 0;
|
||
cn.com.pism.batslog.f.a.var_int_b = 0;
|
||
}
|
||
|
||
public void update(@NotNull AnActionEvent anActionEvent) {
|
||
anActionEvent.getPresentation().setEnabledAndVisible(true);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Joiner
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* com.intellij.uiDesigner.core.Spacer
|
||
* com.intellij.util.ui.JBDimension
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.M.a.a;
|
||
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.ccnode.codegenerator.M.a.a;
|
||
import com.ccnode.codegenerator.m.b_0;
|
||
import com.google.common.base.Joiner;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import com.intellij.uiDesigner.core.Spacer;
|
||
import com.intellij.util.ui.JBDimension;
|
||
import java.awt.Component;
|
||
import java.awt.Dimension;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.awt.event.ActionEvent;
|
||
import java.awt.event.ActionListener;
|
||
import java.util.ArrayList;
|
||
import javax.swing.JButton;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import javax.swing.JScrollPane;
|
||
import javax.swing.JTextArea;
|
||
import org.apache.commons.lang3.StringUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class l {
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private JButton var_javax_swing_JButton_a;
|
||
private JTextArea var_javax_swing_JTextArea_a;
|
||
private JButton b;
|
||
|
||
public l(Project project) {
|
||
this.void_b();
|
||
this.var_javax_swing_JButton_a.addActionListener(new ActionListener(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ l var_com_ccnode_codegenerator_M_a_a_l_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_l_a = l2;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
this.var_com_ccnode_codegenerator_M_a_a_l_a.a(this.var_com_intellij_openapi_project_Project_a);
|
||
}
|
||
});
|
||
this.var_javax_swing_JTextArea_a.setMinimumSize((Dimension)new JBDimension(800, 800));
|
||
this.b.addActionListener(new ActionListener(){
|
||
|
||
@Override
|
||
public void actionPerformed(ActionEvent actionEvent) {
|
||
l.this.void_a();
|
||
}
|
||
});
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void a(Project project) {
|
||
if (this.var_javax_swing_JTextArea_a == null || StringUtils.isBlank((CharSequence)this.var_javax_swing_JTextArea_a.getText())) {
|
||
Messages.showErrorDialog((Project)project, (String)"Text area is empty", (String)"Extract Sql Error");
|
||
return;
|
||
}
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(project);
|
||
String string = this.var_javax_swing_JTextArea_a.getText();
|
||
String string2 = mybatisCodeHelperLogSettingState.getSqlPrefix();
|
||
String string3 = mybatisCodeHelperLogSettingState.getParamsPrefix();
|
||
if (string.contains(string2) && string.contains(string3)) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
String[] stringArray = string.split("\n");
|
||
if (stringArray != null && stringArray.length >= 2) {
|
||
String string4 = "";
|
||
b_0 b_02 = new b_0(project);
|
||
b_02.a();
|
||
for (int i2 = 0; i2 < stringArray.length; ++i2) {
|
||
String string5 = stringArray[i2];
|
||
b_02.a(string5 + "\n", stringArray.length, arrayList, false);
|
||
}
|
||
b_02.a();
|
||
if (arrayList.size() == 0) {
|
||
Messages.showErrorDialog((Project)project, (String)"Cant extract from sql", (String)"Extract Sql Error");
|
||
} else {
|
||
b_0.a(project, Joiner.on((String)"\n\n").join((Iterable)arrayList), com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(project));
|
||
}
|
||
} else {
|
||
Messages.showErrorDialog((Project)project, (String)"Cant extract from sql", (String)"Extract Sql Error");
|
||
}
|
||
} else {
|
||
Messages.showErrorDialog((Project)project, (String)"Cant extract from sql", (String)"Extract Sql Error");
|
||
}
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JTextArea_a.setText("");
|
||
}
|
||
|
||
private void void_b() {
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
JPanel jPanel = new JPanel();
|
||
jPanel.setLayout((LayoutManager)new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)jPanel, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
JScrollPane jScrollPane = new JScrollPane();
|
||
jPanel.add((Component)jScrollPane, new GridConstraints(0, 0, 1, 1, 0, 3, 5, 5, null, null, null, 0, false));
|
||
this.var_javax_swing_JTextArea_a = new JTextArea();
|
||
this.var_javax_swing_JTextArea_a.setColumns(40);
|
||
this.var_javax_swing_JTextArea_a.setEnabled(true);
|
||
this.var_javax_swing_JTextArea_a.setRows(20);
|
||
jScrollPane.setViewportView(this.var_javax_swing_JTextArea_a);
|
||
JPanel jPanel2 = new JPanel();
|
||
jPanel2.setLayout((LayoutManager)new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||
jPanel.add((Component)jPanel2, new GridConstraints(1, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
this.var_javax_swing_JButton_a = new JButton();
|
||
this.var_javax_swing_JButton_a.setText("Convert To Sql");
|
||
jPanel2.add((Component)this.var_javax_swing_JButton_a, new GridConstraints(0, 1, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
Spacer spacer = new Spacer();
|
||
jPanel2.add((Component)spacer, new GridConstraints(0, 0, 1, 1, 0, 1, 4, 1, null, null, null, 0, false));
|
||
this.b = new JButton();
|
||
this.b.setText("Clear");
|
||
jPanel2.add((Component)this.b, new GridConstraints(0, 2, 1, 1, 0, 1, 3, 0, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_b() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.Pair
|
||
* com.intellij.openapi.vfs.LocalFileSystem
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.ui.EditorTextField
|
||
*/
|
||
package com.ccnode.codegenerator.M.a;
|
||
|
||
import com.ccnode.codegenerator.M.a.c;
|
||
import com.ccnode.codegenerator.g.b;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.Pair;
|
||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.ui.EditorTextField;
|
||
import java.io.File;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.Map;
|
||
import javax.swing.JPanel;
|
||
|
||
public class a {
|
||
private Project var_com_intellij_openapi_project_Project_a = new LinkedHashMap<String, c>(this){
|
||
private static final long var_long_a = 1L;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_M_a_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_a_a_a = a2;
|
||
}
|
||
|
||
@Override
|
||
protected boolean removeEldestEntry(Map.Entry<String, c> entry) {
|
||
return this.size() > 200;
|
||
}
|
||
};
|
||
private Map<String, c> var_java_util_Map_java_lang_String,_com_ccnode_codegenerator_M_a_c__a;
|
||
private VirtualFile var_com_intellij_openapi_vfs_VirtualFile_a;
|
||
private JPanel var_javax_swing_JPanel_a;
|
||
private EditorTextField var_com_intellij_ui_EditorTextField_a;
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
*/
|
||
public VirtualFile com_intellij_openapi_vfs_VirtualFile_a() {
|
||
if (this.var_com_intellij_openapi_vfs_VirtualFile_a == null || !this.var_com_intellij_openapi_vfs_VirtualFile_a.exists()) {
|
||
a a2 = this;
|
||
synchronized (a2) {
|
||
File file = null;
|
||
try {
|
||
VirtualFile virtualFile;
|
||
File file2;
|
||
Pair<Language, FileType> pair = b.a();
|
||
String string = System.getProperty("java.io.tmpdir");
|
||
file = file2 = new File(System.getProperty("java.io.tmpdir"), "mybatisCodeHelper_" + this.var_com_intellij_openapi_project_Project_a.getName() + "." + ((FileType)pair.getSecond()).getDefaultExtension());
|
||
if (!file.exists()) {
|
||
file.createNewFile();
|
||
}
|
||
this.var_com_intellij_openapi_vfs_VirtualFile_a = virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file);
|
||
}
|
||
catch (Exception exception) {
|
||
throw new RuntimeException(exception);
|
||
}
|
||
}
|
||
}
|
||
return this.var_com_intellij_openapi_vfs_VirtualFile_a;
|
||
}
|
||
|
||
public void a(VirtualFile virtualFile) {
|
||
this.var_com_intellij_openapi_vfs_VirtualFile_a = virtualFile;
|
||
}
|
||
|
||
public Project com_intellij_openapi_project_Project_a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public JPanel javax_swing_JPanel_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public void a(JPanel jPanel) {
|
||
this.var_javax_swing_JPanel_a = jPanel;
|
||
}
|
||
|
||
public void void_a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public Map<String, c> a() {
|
||
return this.var_com_intellij_openapi_project_Project_a;
|
||
}
|
||
|
||
public void a(Map<String, c> map) {
|
||
this.var_com_intellij_openapi_project_Project_a = map;
|
||
}
|
||
|
||
public a(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
public static final a com_ccnode_codegenerator_M_a_a_a(Project project) {
|
||
return (a)ServiceManager.getService((Project)project, a.class);
|
||
}
|
||
|
||
public EditorTextField com_intellij_ui_EditorTextField_a() {
|
||
return this.var_com_intellij_ui_EditorTextField_a;
|
||
}
|
||
|
||
public void a(EditorTextField editorTextField) {
|
||
this.var_com_intellij_ui_EditorTextField_a = editorTextField;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.wm.ToolWindow
|
||
* com.intellij.openapi.wm.ToolWindowFactory
|
||
* com.intellij.ui.content.Content
|
||
* com.intellij.ui.content.ContentFactory
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.M.a;
|
||
|
||
import com.ccnode.codegenerator.M.a.a.g;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.wm.ToolWindow;
|
||
import com.intellij.openapi.wm.ToolWindowFactory;
|
||
import com.intellij.ui.content.Content;
|
||
import com.intellij.ui.content.ContentFactory;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class b
|
||
implements ToolWindowFactory {
|
||
private JPanel a;
|
||
|
||
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
|
||
this.a = new g(project).javax_swing_JPanel_a();
|
||
ContentFactory contentFactory = ContentFactory.getInstance();
|
||
Content content = contentFactory.createContent((JComponent)this.a, "", false);
|
||
content.setIcon(p.d());
|
||
toolWindow.getContentManager().addContent(content);
|
||
}
|
||
|
||
public void init(ToolWindow toolWindow) {
|
||
toolWindow.setIcon(p.d());
|
||
}
|
||
|
||
public boolean shouldBeAvailable(@NotNull Project project) {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.M.a;
|
||
|
||
public class c {
|
||
private int var_int_a = 0;
|
||
private Long var_java_lang_Long_a;
|
||
|
||
public int int_a() {
|
||
return this.var_int_a;
|
||
}
|
||
|
||
public void a(int n2) {
|
||
this.var_int_a = n2;
|
||
}
|
||
|
||
public Long java_lang_Long_a() {
|
||
return this.var_java_lang_Long_a;
|
||
}
|
||
|
||
public void a(Long l2) {
|
||
this.var_java_lang_Long_a = l2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.M.b;
|
||
|
||
import java.util.HashSet;
|
||
import java.util.LinkedList;
|
||
import java.util.Locale;
|
||
import java.util.Set;
|
||
import java.util.StringTokenizer;
|
||
|
||
public class a {
|
||
private static final Set<String> var_java_util_Set_java_lang_String__a;
|
||
private static final Set<String> var_java_util_Set_java_lang_String__b;
|
||
private static final Set<String> var_java_util_Set_java_lang_String__c;
|
||
private static final Set<String> d;
|
||
private static final Set<String> e;
|
||
private static final Set<String> f;
|
||
private static final String var_java_lang_String_a = " \n\r\f\t";
|
||
private static final String var_java_lang_String_b = " ";
|
||
private static final String var_java_lang_String_c = "\n ";
|
||
|
||
public String a(String string) {
|
||
return new a(string).java_lang_String_a();
|
||
}
|
||
|
||
static {
|
||
var_java_util_Set_java_lang_String__a = new HashSet<String>();
|
||
var_java_util_Set_java_lang_String__b = new HashSet<String>();
|
||
var_java_util_Set_java_lang_String__c = new HashSet<String>();
|
||
d = new HashSet<String>();
|
||
e = new HashSet<String>();
|
||
f = new HashSet<String>();
|
||
var_java_util_Set_java_lang_String__a.add("left");
|
||
var_java_util_Set_java_lang_String__a.add("right");
|
||
var_java_util_Set_java_lang_String__a.add("inner");
|
||
var_java_util_Set_java_lang_String__a.add("outer");
|
||
var_java_util_Set_java_lang_String__a.add("group");
|
||
var_java_util_Set_java_lang_String__a.add("order");
|
||
var_java_util_Set_java_lang_String__b.add("where");
|
||
var_java_util_Set_java_lang_String__b.add("set");
|
||
var_java_util_Set_java_lang_String__b.add("having");
|
||
var_java_util_Set_java_lang_String__b.add("join");
|
||
var_java_util_Set_java_lang_String__b.add("from");
|
||
var_java_util_Set_java_lang_String__b.add("by");
|
||
var_java_util_Set_java_lang_String__b.add("join");
|
||
var_java_util_Set_java_lang_String__b.add("into");
|
||
var_java_util_Set_java_lang_String__b.add("union");
|
||
var_java_util_Set_java_lang_String__c.add("and");
|
||
var_java_util_Set_java_lang_String__c.add("or");
|
||
var_java_util_Set_java_lang_String__c.add("when");
|
||
var_java_util_Set_java_lang_String__c.add("else");
|
||
var_java_util_Set_java_lang_String__c.add("end");
|
||
d.add("in");
|
||
d.add("all");
|
||
d.add("exists");
|
||
d.add("some");
|
||
d.add("any");
|
||
e.add("insert");
|
||
e.add("update");
|
||
e.add("delete");
|
||
f.add("select");
|
||
f.add("on");
|
||
}
|
||
|
||
private static class a {
|
||
boolean var_boolean_a = new LinkedList();
|
||
boolean var_boolean_b = new LinkedList();
|
||
boolean var_boolean_c;
|
||
boolean d;
|
||
boolean e;
|
||
boolean f;
|
||
boolean g;
|
||
int var_int_a;
|
||
int var_int_b;
|
||
private LinkedList<Integer> var_java_util_LinkedList_java_lang_Integer__a;
|
||
private LinkedList<Boolean> var_java_util_LinkedList_java_lang_Boolean__b;
|
||
int var_int_c = 1;
|
||
StringBuilder var_java_lang_StringBuilder_a = new StringBuilder();
|
||
StringTokenizer var_java_util_StringTokenizer_a;
|
||
String var_java_lang_String_a;
|
||
String var_java_lang_String_b;
|
||
String var_java_lang_String_c;
|
||
|
||
public a(String string) {
|
||
this.var_java_util_StringTokenizer_a = new StringTokenizer(string, "()+*/-=<>'`\"[], \n\r\f\t", true);
|
||
}
|
||
|
||
public String java_lang_String_a() {
|
||
this.var_java_lang_StringBuilder_a.append(com.ccnode.codegenerator.M.b.a.var_java_lang_String_c);
|
||
while (this.var_java_util_StringTokenizer_a.hasMoreTokens()) {
|
||
this.var_java_lang_String_b = this.var_java_util_StringTokenizer_a.nextToken();
|
||
this.var_java_lang_String_c = this.var_java_lang_String_b.toLowerCase(Locale.ROOT);
|
||
if ("'".equals(this.var_java_lang_String_b)) {
|
||
do {
|
||
var1_1 = this.var_java_util_StringTokenizer_a.nextToken();
|
||
this.var_java_lang_String_b = this.var_java_lang_String_b + var1_1;
|
||
} while (!"'".equals(var1_1) && this.var_java_util_StringTokenizer_a.hasMoreTokens());
|
||
} else if ("`".equals(this.var_java_lang_String_b)) {
|
||
do {
|
||
var1_1 = this.var_java_util_StringTokenizer_a.nextToken();
|
||
this.var_java_lang_String_b = this.var_java_lang_String_b + var1_1;
|
||
} while (!"`".equals(var1_1) && this.var_java_util_StringTokenizer_a.hasMoreTokens());
|
||
} else if ("\"".equals(this.var_java_lang_String_b)) {
|
||
do {
|
||
var1_1 = this.var_java_util_StringTokenizer_a.nextToken();
|
||
this.var_java_lang_String_b = this.var_java_lang_String_b + var1_1;
|
||
} while (!"\"".equals(var1_1));
|
||
}
|
||
if (this.var_boolean_c && ",".equals(this.var_java_lang_String_b)) {
|
||
this.b();
|
||
} else if (this.e && ",".equals(this.var_java_lang_String_b)) {
|
||
this.void_a();
|
||
} else if ("(".equals(this.var_java_lang_String_b)) {
|
||
this.n();
|
||
} else if (")".equals(this.var_java_lang_String_b)) {
|
||
this.m();
|
||
} else if (var_java_util_Set_java_lang_String__a.contains(this.var_java_lang_String_c)) {
|
||
this.k();
|
||
} else if (var_java_util_Set_java_lang_String__b.contains(this.var_java_lang_String_c)) {
|
||
this.j();
|
||
} else if ("select".equals(this.var_java_lang_String_c)) {
|
||
this.h();
|
||
} else if (e.contains(this.var_java_lang_String_c)) {
|
||
this.g();
|
||
} else if ("values".equals(this.var_java_lang_String_c)) {
|
||
this.l();
|
||
} else if ("on".equals(this.var_java_lang_String_c)) {
|
||
this.d();
|
||
} else if (this.f && this.var_java_lang_String_c.equals("and")) {
|
||
this.e();
|
||
this.f = false;
|
||
} else if (var_java_util_Set_java_lang_String__c.contains(this.var_java_lang_String_c)) {
|
||
this.c();
|
||
} else if (com.ccnode.codegenerator.M.b.a$a.b(this.var_java_lang_String_b)) {
|
||
this.f();
|
||
} else {
|
||
this.e();
|
||
}
|
||
if (com.ccnode.codegenerator.M.b.a$a.b(this.var_java_lang_String_b)) continue;
|
||
this.var_java_lang_String_a = this.var_java_lang_String_c;
|
||
}
|
||
return this.var_java_lang_StringBuilder_a.toString();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.i();
|
||
--this.var_int_c;
|
||
this.o();
|
||
this.e = false;
|
||
this.var_boolean_c = true;
|
||
}
|
||
|
||
private void b() {
|
||
this.i();
|
||
this.o();
|
||
}
|
||
|
||
private void c() {
|
||
if ("end".equals(this.var_java_lang_String_c)) {
|
||
--this.var_int_c;
|
||
}
|
||
this.o();
|
||
this.i();
|
||
this.var_boolean_a = false;
|
||
}
|
||
|
||
private void d() {
|
||
++this.var_int_c;
|
||
this.e = true;
|
||
this.o();
|
||
this.i();
|
||
this.var_boolean_a = false;
|
||
}
|
||
|
||
private void e() {
|
||
this.i();
|
||
if ("between".equals(this.var_java_lang_String_c)) {
|
||
this.f = true;
|
||
}
|
||
if (this.g) {
|
||
this.o();
|
||
this.g = false;
|
||
} else {
|
||
this.var_boolean_a = false;
|
||
if ("case".equals(this.var_java_lang_String_c)) {
|
||
++this.var_int_c;
|
||
}
|
||
}
|
||
}
|
||
|
||
private void f() {
|
||
if (!this.var_boolean_a) {
|
||
this.var_java_lang_StringBuilder_a.append(" ");
|
||
}
|
||
}
|
||
|
||
private void g() {
|
||
this.i();
|
||
++this.var_int_c;
|
||
this.var_boolean_a = false;
|
||
if ("update".equals(this.var_java_lang_String_c)) {
|
||
this.o();
|
||
}
|
||
if ("insert".equals(this.var_java_lang_String_c)) {
|
||
this.g = true;
|
||
}
|
||
}
|
||
|
||
private void h() {
|
||
this.i();
|
||
++this.var_int_c;
|
||
this.o();
|
||
this.var_boolean_a.addLast(this.var_int_b);
|
||
this.var_boolean_b.addLast(this.var_boolean_c);
|
||
this.var_int_b = 0;
|
||
this.var_boolean_c = true;
|
||
}
|
||
|
||
private void i() {
|
||
this.var_java_lang_StringBuilder_a.append(this.var_java_lang_String_b);
|
||
}
|
||
|
||
private void j() {
|
||
if (!this.var_boolean_b) {
|
||
--this.var_int_c;
|
||
if (this.e) {
|
||
--this.var_int_c;
|
||
this.e = false;
|
||
}
|
||
this.o();
|
||
}
|
||
this.i();
|
||
if (!"union".equals(this.var_java_lang_String_c)) {
|
||
++this.var_int_c;
|
||
}
|
||
this.o();
|
||
this.var_boolean_b = false;
|
||
this.var_boolean_c = "by".equals(this.var_java_lang_String_c) || "set".equals(this.var_java_lang_String_c) || "from".equals(this.var_java_lang_String_c);
|
||
}
|
||
|
||
private void k() {
|
||
if (!this.var_boolean_b) {
|
||
if (this.e) {
|
||
--this.var_int_c;
|
||
this.e = false;
|
||
}
|
||
--this.var_int_c;
|
||
this.o();
|
||
}
|
||
this.i();
|
||
this.var_boolean_a = false;
|
||
this.var_boolean_b = true;
|
||
}
|
||
|
||
private void l() {
|
||
--this.var_int_c;
|
||
this.o();
|
||
this.i();
|
||
++this.var_int_c;
|
||
this.o();
|
||
this.d = true;
|
||
}
|
||
|
||
private void m() {
|
||
--this.var_int_b;
|
||
if (this.var_int_b < 0) {
|
||
--this.var_int_c;
|
||
this.var_int_b = (Integer)this.var_boolean_a.removeLast();
|
||
this.var_boolean_c = (Boolean)this.var_boolean_b.removeLast();
|
||
}
|
||
if (this.var_int_a > 0) {
|
||
--this.var_int_a;
|
||
this.i();
|
||
} else {
|
||
if (!this.var_boolean_c) {
|
||
--this.var_int_c;
|
||
this.o();
|
||
}
|
||
this.i();
|
||
}
|
||
this.var_boolean_a = false;
|
||
}
|
||
|
||
private void n() {
|
||
if (com.ccnode.codegenerator.M.b.a$a.a(this.var_java_lang_String_a) || this.var_int_a > 0) {
|
||
++this.var_int_a;
|
||
}
|
||
this.var_boolean_a = false;
|
||
if (this.var_int_a > 0) {
|
||
this.i();
|
||
} else {
|
||
this.i();
|
||
if (!this.var_boolean_c) {
|
||
++this.var_int_c;
|
||
this.o();
|
||
this.var_boolean_a = true;
|
||
}
|
||
}
|
||
++this.var_int_b;
|
||
}
|
||
|
||
private static boolean a(String string) {
|
||
char c2 = string.charAt(0);
|
||
boolean bl = Character.isJavaIdentifierStart(c2) || '\"' == c2;
|
||
return bl && !var_java_util_Set_java_lang_String__c.contains(string) && !var_java_util_Set_java_lang_String__b.contains(string) && !d.contains(string) && !e.contains(string) && !f.contains(string);
|
||
}
|
||
|
||
private static boolean b(String string) {
|
||
return com.ccnode.codegenerator.M.b.a.var_java_lang_String_a.contains(string);
|
||
}
|
||
|
||
private void o() {
|
||
this.var_java_lang_StringBuilder_a.append("\n");
|
||
for (int i2 = 0; i2 < this.var_int_c; ++i2) {
|
||
this.var_java_lang_StringBuilder_a.append(com.ccnode.codegenerator.M.b.a.var_java_lang_String_b);
|
||
}
|
||
this.var_boolean_a = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.q.c;
|
||
import javax.swing.Icon;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.M.a
|
||
*/
|
||
public class a_0 {
|
||
public static final Icon a = c.a("/mybatis/mylog/icon/mybatis.png");
|
||
public static final Icon b = c.a("/mybatis/mylog/icon/text.png");
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.codeInsight.CodeInsightUtil
|
||
* com.intellij.execution.filters.Filter
|
||
* com.intellij.execution.filters.Filter$Result
|
||
* com.intellij.execution.filters.HyperlinkInfo
|
||
* com.intellij.openapi.application.ApplicationManager
|
||
* com.intellij.openapi.command.WriteCommandAction
|
||
* com.intellij.openapi.editor.Document
|
||
* com.intellij.openapi.editor.Editor
|
||
* com.intellij.openapi.editor.ScrollType
|
||
* com.intellij.openapi.editor.ex.util.EditorUtil
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.Messages
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* com.intellij.openapi.wm.ToolWindow
|
||
* com.intellij.openapi.wm.ToolWindowManager
|
||
* com.intellij.psi.PsiDocumentManager
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiManager
|
||
* com.intellij.psi.codeStyle.CodeStyleManager
|
||
* com.intellij.ui.EditorTextField
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.apache.commons.lang3.StringUtils
|
||
* org.apache.commons.lang3.time.DateFormatUtils
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import cn.com.pism.batslog.f.g;
|
||
import cn.com.pism.batslog.settings.MybatisCodeHelperLogSettingState;
|
||
import com.ccnode.codegenerator.M.a.a;
|
||
import com.ccnode.codegenerator.M.a.c;
|
||
import com.intellij.codeInsight.CodeInsightUtil;
|
||
import com.intellij.execution.filters.Filter;
|
||
import com.intellij.execution.filters.HyperlinkInfo;
|
||
import com.intellij.openapi.application.ApplicationManager;
|
||
import com.intellij.openapi.command.WriteCommandAction;
|
||
import com.intellij.openapi.editor.Document;
|
||
import com.intellij.openapi.editor.Editor;
|
||
import com.intellij.openapi.editor.ScrollType;
|
||
import com.intellij.openapi.editor.ex.util.EditorUtil;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.Messages;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import com.intellij.openapi.wm.ToolWindow;
|
||
import com.intellij.openapi.wm.ToolWindowManager;
|
||
import com.intellij.psi.PsiDocumentManager;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiManager;
|
||
import com.intellij.psi.codeStyle.CodeStyleManager;
|
||
import com.intellij.ui.EditorTextField;
|
||
import java.io.Serializable;
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
import javax.swing.JPanel;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.M.b
|
||
*/
|
||
public class b_0
|
||
implements Filter {
|
||
private final Project var_com_intellij_openapi_project_Project_a;
|
||
private String var_java_lang_String_a = "";
|
||
|
||
public b_0(Project project) {
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Nullable
|
||
public Filter.Result applyFilter(String string, int n2) {
|
||
return this.a(string, n2, null, true);
|
||
}
|
||
|
||
/*
|
||
* WARNING - Removed try catching itself - possible behaviour change.
|
||
*/
|
||
@Nullable
|
||
public Filter.Result a(String string, int n2, List<String> list, boolean bl) {
|
||
int n3 = 40000;
|
||
if (this.var_com_intellij_openapi_project_Project_a == null) {
|
||
return null;
|
||
}
|
||
if (StringUtils.isBlank((String)string)) {
|
||
return null;
|
||
}
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(this.var_com_intellij_openapi_project_Project_a);
|
||
if (string.contains(mybatisCodeHelperLogSettingState.getSqlPrefix())) {
|
||
this.var_java_lang_String_a = string;
|
||
return null;
|
||
}
|
||
if (StringUtils.isEmpty((String)this.var_java_lang_String_a)) {
|
||
return null;
|
||
}
|
||
boolean bl2 = string.contains(mybatisCodeHelperLogSettingState.getParamsPrefix());
|
||
if (!bl2) {
|
||
return null;
|
||
}
|
||
String string2 = string;
|
||
if (StringUtils.isNotEmpty((String)this.var_java_lang_String_a) && StringUtils.isNotEmpty((String)string2)) {
|
||
int n4;
|
||
Object object;
|
||
Object object2;
|
||
Object object3;
|
||
Object object4;
|
||
if (this.var_java_lang_String_a.length() > n3 && bl) {
|
||
int n5 = n2 - string.length();
|
||
int n6 = string.indexOf(mybatisCodeHelperLogSettingState.getParamsPrefix());
|
||
return new Filter.Result(n5 + n6, n5 + n6 + mybatisCodeHelperLogSettingState.getParamsPrefix().length(), new HyperlinkInfo(){
|
||
|
||
public void navigate(Project project) {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ 1 var_com_ccnode_codegenerator_M_b$1_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_M_b$1_a = var1_1;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
Messages.showErrorDialog((Project)this.var_com_intellij_openapi_project_Project_a, (String)"Preparing line is too long, please copy it to Mybatis sql -> convert text to sql to get the final sql", (String)"Too long sql");
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
String string3 = g.a(this.var_java_lang_String_a, string2, this.var_com_intellij_openapi_project_Project_a);
|
||
if (list != null) {
|
||
list.add(string3);
|
||
return null;
|
||
}
|
||
boolean bl3 = false;
|
||
a a2 = com.ccnode.codegenerator.M.a.a.com_ccnode_codegenerator_M_a_a_a(this.var_com_intellij_openapi_project_Project_a);
|
||
int n7 = cn.com.pism.batslog.f.a.var_int_b;
|
||
cn.com.pism.batslog.f.a.var_int_b = ++n7;
|
||
if (list == null && mybatisCodeHelperLogSettingState.getRemoveDuplicateSql().booleanValue()) {
|
||
object4 = this;
|
||
synchronized (object4) {
|
||
long l2 = new Date().getTime();
|
||
object3 = this.var_java_lang_String_a + string;
|
||
object2 = a2.a();
|
||
if (object2.containsKey(object3)) {
|
||
object = (c)object2.get(object3);
|
||
n4 = ((c)object).int_a();
|
||
Long l3 = ((c)object).java_lang_Long_a();
|
||
if (l2 - l3 < (long)mybatisCodeHelperLogSettingState.getRemoveDuplicateTimeInterval()) {
|
||
((c)object).a(((c)object).int_a() + 1);
|
||
((c)object).a(l2);
|
||
bl3 = true;
|
||
}
|
||
}
|
||
if (!bl3) {
|
||
object = new c();
|
||
((c)object).a(l2);
|
||
((c)object).a(1);
|
||
object2.put(object3, object);
|
||
}
|
||
}
|
||
}
|
||
object4 = "";
|
||
int n8 = this.var_java_lang_String_a.indexOf(mybatisCodeHelperLogSettingState.getSqlPrefix());
|
||
String string4 = this.var_java_lang_String_a.substring(0, n8);
|
||
object3 = this.a(string4);
|
||
if (!(list != null || bl3 && mybatisCodeHelperLogSettingState.getRemoveDuplicateSql().booleanValue() || !((Boolean)(object2 = cn.com.pism.batslog.f.a.a(this.var_com_intellij_openapi_project_Project_a))).booleanValue())) {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
final /* synthetic */ MybatisCodeHelperLogSettingState var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_M_a_a_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ String b;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_m_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_m_b_0_a = b_02;
|
||
this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a = mybatisCodeHelperLogSettingState;
|
||
this.var_com_ccnode_codegenerator_M_a_a_a = a2;
|
||
this.var_java_lang_String_a = string;
|
||
this.b = string2;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
ToolWindow toolWindow = ToolWindowManager.getInstance((Project)this.var_com_ccnode_codegenerator_m_b_0_a.var_com_intellij_openapi_project_Project_a).getToolWindow("Mybatis Sql");
|
||
if (toolWindow != null) {
|
||
if (this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a.getAutoJumpOut().booleanValue()) {
|
||
this.var_com_ccnode_codegenerator_m_b_0_a.a(this.var_com_ccnode_codegenerator_M_a_a_a, this.var_java_lang_String_a, this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a, this.b);
|
||
toolWindow.show(new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
}
|
||
});
|
||
} else {
|
||
this.var_com_ccnode_codegenerator_m_b_0_a.a(this.var_com_ccnode_codegenerator_M_a_a_a, this.var_java_lang_String_a, this.var_cn_com_pism_batslog_settings_MybatisCodeHelperLogSettingState_a, this.b);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
object2 = this.var_java_lang_String_a;
|
||
object = string2;
|
||
string2 = "";
|
||
n4 = n2 - string.length();
|
||
int n9 = string.indexOf(mybatisCodeHelperLogSettingState.getParamsPrefix());
|
||
return new Filter.Result(n4 + n9, n4 + n9 + mybatisCodeHelperLogSettingState.getParamsPrefix().length(), new HyperlinkInfo(){
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_M_a_a_a;
|
||
final /* synthetic */ String b;
|
||
final /* synthetic */ String c;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_m_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_m_b_0_a = b_02;
|
||
this.var_java_lang_String_a = string;
|
||
this.var_com_ccnode_codegenerator_M_a_a_a = a2;
|
||
this.b = string2;
|
||
this.c = string3;
|
||
}
|
||
|
||
public void navigate(Project project) {
|
||
b_0.a(project, this.var_java_lang_String_a, this.var_com_ccnode_codegenerator_M_a_a_a, this.b, this.c);
|
||
}
|
||
});
|
||
}
|
||
return null;
|
||
}
|
||
|
||
private String a(String string) {
|
||
String string2 = string.trim();
|
||
String[] stringArray = string2.split(" ");
|
||
if (stringArray.length > 0 && stringArray[0].contains(".")) {
|
||
return stringArray[0];
|
||
}
|
||
return "";
|
||
}
|
||
|
||
private void a(a a2, String string, MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState, String string2) {
|
||
String string3;
|
||
JPanel jPanel = a2.javax_swing_JPanel_a();
|
||
if (jPanel == null) {
|
||
return;
|
||
}
|
||
long l2 = new Date().getTime();
|
||
String string4 = mybatisCodeHelperLogSettingState.getTimeFormat();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
int n2 = cn.com.pism.batslog.f.a.var_int_a;
|
||
cn.com.pism.batslog.f.a.var_int_a = ++n2;
|
||
stringBuilder.append(n2);
|
||
if (mybatisCodeHelperLogSettingState.getAddTimestamp().booleanValue()) {
|
||
string3 = " " + (Serializable)(org.apache.commons.lang3.StringUtils.isBlank((CharSequence)string4) ? Long.valueOf(l2) : DateFormatUtils.format((long)l2, (String)string4)) + " ";
|
||
stringBuilder.append(string3);
|
||
}
|
||
string3 = "/*" + stringBuilder.toString() + " " + string + " */";
|
||
WriteCommandAction.runWriteCommandAction((Project)this.var_com_intellij_openapi_project_Project_a, (Runnable)new Runnable(){
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_M_a_a_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
final /* synthetic */ String b;
|
||
final /* synthetic */ b_0 var_com_ccnode_codegenerator_m_b_0_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_m_b_0_a = b_02;
|
||
this.var_com_ccnode_codegenerator_M_a_a_a = a2;
|
||
this.var_java_lang_String_a = string;
|
||
this.b = string2;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
Document document = this.var_com_ccnode_codegenerator_M_a_a_a.com_intellij_ui_EditorTextField_a().getDocument();
|
||
int n2 = document.getTextLength();
|
||
document.insertString(n2, (CharSequence)("\n\n" + this.var_java_lang_String_a + "\n" + this.b));
|
||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance((Project)this.var_com_ccnode_codegenerator_m_b_0_a.var_com_intellij_openapi_project_Project_a);
|
||
psiDocumentManager.commitDocument(document);
|
||
PsiFile psiFile = psiDocumentManager.getPsiFile(document);
|
||
Boolean bl = MybatisCodeHelperLogSettingState.getInstance(this.var_com_ccnode_codegenerator_m_b_0_a.var_com_intellij_openapi_project_Project_a).getFormatSql();
|
||
if (bl.booleanValue() && psiFile != null) {
|
||
CodeStyleManager.getInstance((Project)this.var_com_ccnode_codegenerator_m_b_0_a.var_com_intellij_openapi_project_Project_a).reformatRange((PsiElement)psiFile, n2, psiFile.getTextLength());
|
||
}
|
||
if (n2 > 200000) {
|
||
document.deleteString(0, 50000);
|
||
}
|
||
}
|
||
});
|
||
EditorTextField editorTextField = a2.com_intellij_ui_EditorTextField_a();
|
||
Editor editor = editorTextField.getEditor();
|
||
if (editor != null) {
|
||
EditorUtil.scrollToTheEnd((Editor)editor, (boolean)true);
|
||
}
|
||
}
|
||
|
||
public void a() {
|
||
this.var_java_lang_String_a = "";
|
||
}
|
||
|
||
public static void a(Project project, String string, a a2, String string2, String string3) {
|
||
b_0.a(project, string, a2);
|
||
}
|
||
|
||
public static void a(Project project, String string, a a2) {
|
||
String string2 = "\n\n\n" + string;
|
||
VirtualFile virtualFile = a2.com_intellij_openapi_vfs_VirtualFile_a();
|
||
PsiFile psiFile = PsiManager.getInstance((Project)project).findFile(virtualFile);
|
||
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance((Project)project);
|
||
WriteCommandAction.runWriteCommandAction((Project)project, (Runnable)new Runnable(){
|
||
final /* synthetic */ PsiDocumentManager var_com_intellij_psi_PsiDocumentManager_a;
|
||
final /* synthetic */ PsiFile var_com_intellij_psi_PsiFile_a;
|
||
final /* synthetic */ Project var_com_intellij_openapi_project_Project_a;
|
||
final /* synthetic */ String var_java_lang_String_a;
|
||
{
|
||
this.var_com_intellij_psi_PsiDocumentManager_a = psiDocumentManager;
|
||
this.var_com_intellij_psi_PsiFile_a = psiFile;
|
||
this.var_com_intellij_openapi_project_Project_a = project;
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
@Override
|
||
public void run() {
|
||
Document document = this.var_com_intellij_psi_PsiDocumentManager_a.getDocument(this.var_com_intellij_psi_PsiFile_a);
|
||
if (document == null) {
|
||
ApplicationManager.getApplication().invokeLater(new Runnable(){
|
||
|
||
@Override
|
||
public void run() {
|
||
Messages.showInfoMessage((Project)var_com_intellij_openapi_project_Project_a, (String)"please add file type association with .sql to sql file or text file", (String)".sql file type not found");
|
||
}
|
||
});
|
||
return;
|
||
}
|
||
document.insertString(document.getTextLength(), (CharSequence)this.var_java_lang_String_a);
|
||
this.var_com_intellij_psi_PsiDocumentManager_a.commitDocument(document);
|
||
Editor editor = CodeInsightUtil.positionCursor((Project)this.var_com_intellij_openapi_project_Project_a, (PsiFile)this.var_com_intellij_psi_PsiFile_a, (PsiElement)this.var_com_intellij_psi_PsiFile_a);
|
||
editor.getCaretModel().moveToOffset(document.getTextLength());
|
||
editor.getScrollingModel().scrollToCaret(ScrollType.CENTER);
|
||
MybatisCodeHelperLogSettingState mybatisCodeHelperLogSettingState = MybatisCodeHelperLogSettingState.getInstance(this.var_com_intellij_openapi_project_Project_a);
|
||
if (mybatisCodeHelperLogSettingState.getFormatSql().booleanValue()) {
|
||
CodeStyleManager.getInstance((Project)this.var_com_intellij_openapi_project_Project_a).reformat((PsiElement)this.var_com_intellij_psi_PsiFile_a);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.execution.filters.ConsoleFilterProvider
|
||
* com.intellij.execution.filters.Filter
|
||
* com.intellij.openapi.project.Project
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.m;
|
||
|
||
import com.ccnode.codegenerator.m.b_0;
|
||
import com.intellij.execution.filters.ConsoleFilterProvider;
|
||
import com.intellij.execution.filters.Filter;
|
||
import com.intellij.openapi.project.Project;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.M.c
|
||
*/
|
||
public class c_0
|
||
implements ConsoleFilterProvider {
|
||
@NotNull
|
||
public Filter[] getDefaultFilters(@NotNull Project project) {
|
||
b_0 b_02 = new b_0(project);
|
||
return new Filter[]{b_02};
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* ognl.Ognl
|
||
*/
|
||
package com.ccnode.codegenerator.n;
|
||
|
||
import com.ccnode.codegenerator.mybatisGenerator.plugins.GlobalTool;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import ognl.Ognl;
|
||
|
||
/*
|
||
* Renamed from com.ccnode.codegenerator.N.d
|
||
*/
|
||
public class d_0 {
|
||
public static String a(String string, String string2) {
|
||
try {
|
||
HashMap<String, Object> hashMap = new HashMap<String, Object>();
|
||
hashMap.put("name", string);
|
||
hashMap.put("tool", GlobalTool.com_ccnode_codegenerator_mybatisGenerator_plugins_GlobalTool_a());
|
||
String string3 = (String)Ognl.getValue((String)string2, (Map)Ognl.createDefaultContext(hashMap), hashMap);
|
||
return string3;
|
||
}
|
||
catch (Exception exception) {
|
||
throw new RuntimeException("ognl ognlEvaluate failed, the expression is:" + string2, exception);
|
||
}
|
||
}
|
||
|
||
public static Boolean a(Map<String, Object> map, String string) {
|
||
try {
|
||
Boolean bl = (Boolean)Ognl.getValue((String)string, (Map)Ognl.createDefaultContext(map), map);
|
||
return bl;
|
||
}
|
||
catch (Exception exception) {
|
||
throw new RuntimeException("ognl ognlEvaluate failed, the expression is:" + string, exception);
|
||
}
|
||
}
|
||
|
||
public Object a(String string) {
|
||
try {
|
||
HashMap hashMap = new HashMap();
|
||
Object object = Ognl.getValue((String)string, (Map)Ognl.createDefaultContext(hashMap), hashMap);
|
||
return object;
|
||
}
|
||
catch (Exception exception) {
|
||
throw new RuntimeException("ognl ognlEvaluate failed, the expression is:" + string, exception);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
public class a
|
||
extends RuntimeException {
|
||
private static final long a = -3885164021020443281L;
|
||
|
||
public a() {
|
||
}
|
||
|
||
public a(String string) {
|
||
super(string);
|
||
}
|
||
|
||
public a(String string, Throwable throwable) {
|
||
super(string, throwable);
|
||
}
|
||
|
||
public a(Throwable throwable) {
|
||
super(throwable);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInspection.LocalInspectionTool
|
||
* com.intellij.codeInspection.LocalQuickFix
|
||
* com.intellij.codeInspection.ProblemHighlightType
|
||
* com.intellij.codeInspection.ProblemsHolder
|
||
* com.intellij.lang.injection.InjectedLanguageManager
|
||
* com.intellij.openapi.components.ServiceManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiClassType
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiElementFactory$SERVICE
|
||
* com.intellij.psi.PsiElementVisitor
|
||
* com.intellij.psi.PsiLanguageInjectionHost
|
||
* com.intellij.psi.PsiMethod
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.PsiType
|
||
* com.intellij.psi.util.PropertyMemberType
|
||
* com.intellij.psi.util.PsiTreeUtil
|
||
* com.intellij.psi.util.PsiTypesUtil
|
||
* kotlin.Pair
|
||
* org.apache.commons.lang.StringUtils
|
||
* org.jetbrains.annotations.Nls
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
* org.jetbrains.uast.UElement
|
||
* org.jetbrains.uast.ULiteralExpression
|
||
* org.jetbrains.uast.UastContext
|
||
*/
|
||
package com.ccnode.codegenerator.O.a;
|
||
|
||
import com.ccnode.codegenerator.O.d.b;
|
||
import com.ccnode.codegenerator.O.d.c;
|
||
import com.ccnode.codegenerator.O.d.l;
|
||
import com.ccnode.codegenerator.O.d.q;
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.t_0;
|
||
import com.ccnode.codegenerator.ag.h.h;
|
||
import com.ccnode.codegenerator.k.d;
|
||
import com.ccnode.codegenerator.n.h_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInspection.LocalInspectionTool;
|
||
import com.intellij.codeInspection.LocalQuickFix;
|
||
import com.intellij.codeInspection.ProblemHighlightType;
|
||
import com.intellij.codeInspection.ProblemsHolder;
|
||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||
import com.intellij.openapi.components.ServiceManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiClassType;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiElementFactory;
|
||
import com.intellij.psi.PsiElementVisitor;
|
||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||
import com.intellij.psi.PsiMethod;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.PsiType;
|
||
import com.intellij.psi.util.PropertyMemberType;
|
||
import com.intellij.psi.util.PsiTreeUtil;
|
||
import com.intellij.psi.util.PsiTypesUtil;
|
||
import java.util.ArrayList;
|
||
import kotlin.Pair;
|
||
import org.apache.commons.lang.StringUtils;
|
||
import org.jetbrains.annotations.Nls;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
import org.jetbrains.uast.UElement;
|
||
import org.jetbrains.uast.ULiteralExpression;
|
||
import org.jetbrains.uast.UastContext;
|
||
|
||
public class a
|
||
extends LocalInspectionTool {
|
||
@NotNull
|
||
public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder problemsHolder, boolean bl) {
|
||
boolean bl2 = com.ccnode.codegenerator.j.a.com_ccnode_codegenerator_myconfigurable_Profile_a().getValid();
|
||
if (bl2) {
|
||
return new q(this, problemsHolder){
|
||
final /* synthetic */ ProblemsHolder var_com_intellij_codeInspection_ProblemsHolder_a;
|
||
final /* synthetic */ a var_com_ccnode_codegenerator_O_a_a_a;
|
||
{
|
||
this.var_com_ccnode_codegenerator_O_a_a_a = a2;
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a = problemsHolder;
|
||
}
|
||
|
||
@Override
|
||
public void a(@NotNull l l2) {
|
||
PsiReference[] psiReferenceArray = l2.getReferences();
|
||
if (psiReferenceArray.length > 0) {
|
||
PsiClass psiClass;
|
||
Project project = l2.getProject();
|
||
PsiLanguageInjectionHost psiLanguageInjectionHost = InjectedLanguageManager.getInstance((Project)project).getInjectionHost((PsiElement)l2);
|
||
if (psiLanguageInjectionHost == null) {
|
||
return;
|
||
}
|
||
Pair pair = null;
|
||
UElement uElement = ((UastContext)ServiceManager.getService((Project)project, UastContext.class)).convertElementWithParent((PsiElement)psiLanguageInjectionHost, (Class)null);
|
||
if (uElement instanceof ULiteralExpression) {
|
||
var7_7 = (PsiMethod)PsiTreeUtil.getContextOfType((PsiElement)uElement.getJavaPsi(), (Class[])new Class[]{PsiMethod.class});
|
||
if (var7_7 == null) {
|
||
return;
|
||
}
|
||
psiClass = var7_7.getContainingClass();
|
||
if (psiClass == null) {
|
||
return;
|
||
}
|
||
pair = new Pair((Object)psiClass, (Object)var7_7);
|
||
} else {
|
||
var7_7 = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a((PsiElement)psiLanguageInjectionHost, true);
|
||
if (var7_7 == null) {
|
||
return;
|
||
}
|
||
pair = d_0.var_com_ccnode_codegenerator_ad_d_0_a.a(var7_7);
|
||
}
|
||
if (pair != null && !t_0.var_com_ccnode_codegenerator_ad_t_0_a.a(project, (PsiMethod)pair.getSecond())) {
|
||
for (int i2 = 0; i2 < psiReferenceArray.length; ++i2) {
|
||
psiClass = psiReferenceArray[i2];
|
||
if (psiClass.resolve() != null) continue;
|
||
LocalQuickFix[] localQuickFixArray = a.a(psiReferenceArray, (Pair<PsiClass, PsiMethod>)pair, i2, (PsiReference)psiClass);
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a.registerProblem(psiClass.getElement(), "cant resolve param", ProblemHighlightType.ERROR, psiClass.getRangeInElement(), localQuickFixArray);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public void a(@NotNull com.ccnode.codegenerator.O.d.a a2) {
|
||
b b2 = a2.com_ccnode_codegenerator_O_d_b_a();
|
||
String string = b2.getText();
|
||
if (StringUtils.isNotBlank((String)string)) {
|
||
if (!d.var_java_lang_String_a.contains(string)) {
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a.registerProblem((PsiElement)b2, "Attribute name not found", ProblemHighlightType.ERROR, new LocalQuickFix[0]);
|
||
} else {
|
||
String string2;
|
||
c c2 = a2.com_ccnode_codegenerator_O_d_c_a();
|
||
if (string.equals("javaType") || string.equals("typeHandler") || string.equals("jdbcType")) {
|
||
if (c2 != null && c2.com_ccnode_codegenerator_O_d_m_a() != null) {
|
||
PsiReference[] psiReferenceArray;
|
||
for (PsiReference psiReference : psiReferenceArray = c2.com_ccnode_codegenerator_O_d_m_a().getReferences()) {
|
||
if (psiReference.resolve() != null) continue;
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a.registerProblem(psiReference.getElement(), "cant resolve", ProblemHighlightType.ERROR, psiReference.getRangeInElement(), new LocalQuickFix[0]);
|
||
}
|
||
}
|
||
} else if (string.equals("resultMap")) {
|
||
if (c2 != null && c2.com_ccnode_codegenerator_O_d_m_a() != null) {
|
||
PsiReference[] psiReferenceArray = c2.com_ccnode_codegenerator_O_d_m_a().getReferences();
|
||
boolean bl = false;
|
||
for (PsiReference psiReference : psiReferenceArray) {
|
||
if (psiReference instanceof com.ccnode.codegenerator.O.e.c) {
|
||
bl = true;
|
||
}
|
||
if (psiReference.resolve() != null) continue;
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a.registerProblem(psiReference.getElement(), "cant resolve", ProblemHighlightType.ERROR, psiReference.getRangeInElement(), new LocalQuickFix[0]);
|
||
}
|
||
if (!bl) {
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a.registerProblem((PsiElement)c2.com_ccnode_codegenerator_O_d_m_a(), "Cant find resultMap", ProblemHighlightType.ERROR, new LocalQuickFix[0]);
|
||
}
|
||
}
|
||
} else if (string.equals("mode") && c2 != null && c2.com_ccnode_codegenerator_O_d_m_a() != null && !d.var_java_lang_String_b.contains(string2 = c2.com_ccnode_codegenerator_O_d_m_a().getText())) {
|
||
this.var_com_intellij_codeInspection_ProblemsHolder_a.registerProblem((PsiElement)c2.com_ccnode_codegenerator_O_d_m_a(), "Cant find mode", ProblemHighlightType.ERROR, new LocalQuickFix[0]);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
}
|
||
return new q();
|
||
}
|
||
|
||
@NotNull
|
||
public static LocalQuickFix[] a(PsiReference[] psiReferenceArray, Pair<PsiClass, PsiMethod> pair, int n2, PsiReference psiReference) {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
Project project = psiReference.getElement().getProject();
|
||
if (n2 == 0) {
|
||
PsiMethod psiMethod;
|
||
PsiClass psiClass = t_0.var_com_ccnode_codegenerator_ad_t_0_a.a(pair);
|
||
if (psiClass != null && psiClass.isWritable()) {
|
||
psiMethod = PsiElementFactory.SERVICE.getInstance((Project)project).createTypeByFQClassName("java.lang.String");
|
||
arrayList.add(new h(psiClass, (PsiType)psiMethod, PropertyMemberType.FIELD));
|
||
}
|
||
psiMethod = (PsiMethod)pair.getSecond();
|
||
arrayList.add(new com.ccnode.codegenerator.ag.h.d(psiMethod, psiReference.getCanonicalText()));
|
||
} else {
|
||
PsiClass psiClass;
|
||
h_0 h_02;
|
||
PsiType psiType;
|
||
PsiReference psiReference2 = psiReferenceArray[n2 - 1];
|
||
if (psiReference2 instanceof h_0 && (psiType = (h_02 = (h_0)psiReference2).a()) != null && (psiClass = PsiTypesUtil.getPsiClass((PsiType)psiType)) != null && psiClass.isWritable()) {
|
||
PsiClassType psiClassType = PsiElementFactory.SERVICE.getInstance((Project)project).createTypeByFQClassName("java.lang.String");
|
||
arrayList.add(new h(psiClass, (PsiType)psiClassType, PropertyMemberType.FIELD));
|
||
}
|
||
}
|
||
return arrayList.toArray(new LocalQuickFix[arrayList.size()]);
|
||
}
|
||
|
||
@Nls
|
||
@NotNull
|
||
public String getGroupDisplayName() {
|
||
return "MybatisCodeHelperCheck";
|
||
}
|
||
|
||
@Nls
|
||
@NotNull
|
||
public String getDisplayName() {
|
||
return "Mybatis Param Inspection";
|
||
}
|
||
|
||
@NotNull
|
||
public String getShortName() {
|
||
return "ParamInspection";
|
||
}
|
||
|
||
@Nullable
|
||
public String getStaticDescription() {
|
||
return "Check Mybatis param is right";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.ui.DialogWrapper
|
||
* com.intellij.openapi.ui.VerticalFlowLayout
|
||
* com.intellij.uiDesigner.core.GridConstraints
|
||
* com.intellij.uiDesigner.core.GridLayoutManager
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.b;
|
||
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.ui.DialogWrapper;
|
||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||
import com.intellij.uiDesigner.core.GridConstraints;
|
||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||
import java.awt.Component;
|
||
import java.awt.Insets;
|
||
import java.awt.LayoutManager;
|
||
import java.util.List;
|
||
import javax.swing.JCheckBox;
|
||
import javax.swing.JComponent;
|
||
import javax.swing.JPanel;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends DialogWrapper {
|
||
private final List<String> var_java_util_List_java_lang_String__a;
|
||
private List<String> var_java_util_List_java_lang_String__b = Lists.newArrayList();
|
||
public JPanel var_javax_swing_JPanel_a;
|
||
public JPanel var_javax_swing_JPanel_b;
|
||
private List<JCheckBox> c = Lists.newArrayList();
|
||
|
||
protected c(@Nullable Project project, boolean bl, List<String> list) {
|
||
super(project, bl);
|
||
this.var_java_util_List_java_lang_String__a = list;
|
||
this.b();
|
||
for (String string : list) {
|
||
JCheckBox jCheckBox = new JCheckBox(string);
|
||
jCheckBox.setSelected(true);
|
||
this.c.add(jCheckBox);
|
||
this.var_javax_swing_JPanel_b.add(jCheckBox);
|
||
}
|
||
this.setTitle("Choose param for if test");
|
||
this.setOKButtonText("OK");
|
||
this.init();
|
||
}
|
||
|
||
private void void_a() {
|
||
this.var_javax_swing_JPanel_b = new JPanel();
|
||
this.var_javax_swing_JPanel_b.setLayout((LayoutManager)new VerticalFlowLayout());
|
||
}
|
||
|
||
protected void doOKAction() {
|
||
for (JCheckBox jCheckBox : this.c) {
|
||
if (!jCheckBox.isSelected()) continue;
|
||
String string = jCheckBox.getText();
|
||
this.var_java_util_List_java_lang_String__b.add(string);
|
||
}
|
||
super.doOKAction();
|
||
}
|
||
|
||
@Nullable
|
||
protected JComponent createCenterPanel() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
private void b() {
|
||
this.void_a();
|
||
this.var_javax_swing_JPanel_a = new JPanel();
|
||
this.var_javax_swing_JPanel_a.setLayout((LayoutManager)new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||
this.var_javax_swing_JPanel_a.add((Component)this.var_javax_swing_JPanel_b, new GridConstraints(0, 0, 1, 1, 0, 3, 3, 3, null, null, null, 0, false));
|
||
}
|
||
|
||
public JComponent javax_swing_JComponent_a() {
|
||
return this.var_javax_swing_JPanel_a;
|
||
}
|
||
|
||
public void a(List<String> list) {
|
||
this.var_java_util_List_java_lang_String__b = list;
|
||
}
|
||
|
||
public List<String> a() {
|
||
return this.var_java_util_List_java_lang_String__b;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.O.b;
|
||
|
||
public class d {
|
||
private String var_java_lang_String_a;
|
||
private Integer var_java_lang_Integer_a;
|
||
private Integer b;
|
||
|
||
public String java_lang_String_a() {
|
||
return this.var_java_lang_String_a;
|
||
}
|
||
|
||
public void a(String string) {
|
||
this.var_java_lang_String_a = string;
|
||
}
|
||
|
||
public Integer java_lang_Integer_a() {
|
||
return this.var_java_lang_Integer_a;
|
||
}
|
||
|
||
public void a(Integer n2) {
|
||
this.var_java_lang_Integer_a = n2;
|
||
}
|
||
|
||
public Integer b() {
|
||
return this.b;
|
||
}
|
||
|
||
public void b(Integer n2) {
|
||
this.b = n2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.extapi.psi.ASTWrapperPsiElement
|
||
* com.intellij.ide.projectView.PresentationData
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.navigation.ItemPresentation
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReference
|
||
* com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider
|
||
* com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceSet
|
||
* com.intellij.util.PlatformIcons
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.d.a;
|
||
import com.ccnode.codegenerator.O.d.b;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
||
import com.intellij.ide.projectView.PresentationData;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.navigation.ItemPresentation;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReference;
|
||
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider;
|
||
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceSet;
|
||
import com.intellij.util.PlatformIcons;
|
||
import java.util.ArrayList;
|
||
import java.util.Arrays;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class c
|
||
extends ASTWrapperPsiElement {
|
||
public c(@NotNull ASTNode aSTNode) {
|
||
super(aSTNode);
|
||
}
|
||
|
||
public ItemPresentation getPresentation() {
|
||
return new PresentationData(this.getText(), null, PlatformIcons.PARAMETER_ICON, null);
|
||
}
|
||
|
||
@NotNull
|
||
public PsiReference[] getReferences() {
|
||
PsiElement psiElement;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
PsiElement psiElement2 = this.getParent();
|
||
if (psiElement2 != null && psiElement2 instanceof com.ccnode.codegenerator.O.d.c && (psiElement = psiElement2.getParent()) instanceof a) {
|
||
a a2 = (a)psiElement;
|
||
b b2 = a2.com_ccnode_codegenerator_O_d_b_a();
|
||
String string = b2.getText();
|
||
if (string.equals("jdbcType")) {
|
||
arrayList.add(new com.ccnode.codegenerator.O.e.a((PsiElement)this, new TextRange(0, this.getTextLength()), true));
|
||
} else if (string.equals("javaType")) {
|
||
if (!this.getText().contains(".")) {
|
||
arrayList.add(new com.ccnode.codegenerator.O.e.b((PsiElement)this, new TextRange(0, this.getTextLength()), true, true));
|
||
} else {
|
||
JavaClassReferenceProvider javaClassReferenceProvider = new JavaClassReferenceProvider();
|
||
JavaClassReference[] javaClassReferenceArray = new JavaClassReferenceSet(this.getText(), (PsiElement)this, 0, false, javaClassReferenceProvider).getAllReferences();
|
||
arrayList.addAll(Arrays.asList(javaClassReferenceArray));
|
||
}
|
||
} else if (string.equals("typeHandler")) {
|
||
if (!this.getText().contains(".")) {
|
||
arrayList.add(new com.ccnode.codegenerator.O.e.b((PsiElement)this, new TextRange(0, this.getTextLength()), true, false));
|
||
} else {
|
||
JavaClassReferenceProvider javaClassReferenceProvider = new JavaClassReferenceProvider();
|
||
JavaClassReference[] javaClassReferenceArray = new JavaClassReferenceSet(this.getText(), (PsiElement)this, 0, false, javaClassReferenceProvider).getAllReferences();
|
||
arrayList.addAll(Arrays.asList(javaClassReferenceArray));
|
||
}
|
||
} else if (string.equals("resultMap")) {
|
||
if (!this.getText().contains(".")) {
|
||
arrayList.add(new com.ccnode.codegenerator.O.e.c((PsiElement)this, new TextRange(0, this.getTextLength()), true, false));
|
||
} else {
|
||
JavaClassReferenceProvider javaClassReferenceProvider = new JavaClassReferenceProvider();
|
||
JavaClassReference[] javaClassReferenceArray = new JavaClassReferenceSet(this.getText(), (PsiElement)this, 0, false, javaClassReferenceProvider).getAllReferences();
|
||
arrayList.addAll(Arrays.asList(javaClassReferenceArray));
|
||
if (javaClassReferenceArray.length >= 2 && javaClassReferenceArray[javaClassReferenceArray.length - 2].resolve() instanceof PsiClass) {
|
||
arrayList.remove(arrayList.size() - 1);
|
||
int n2 = this.getText().lastIndexOf(".");
|
||
arrayList.add(new com.ccnode.codegenerator.O.e.c((PsiElement)this, new TextRange(n2 + 1, this.getTextLength()), true, true));
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return arrayList.toArray(new PsiReference[0]);
|
||
}
|
||
|
||
public PsiReference getReference() {
|
||
PsiReference[] psiReferenceArray = this.getReferences();
|
||
if (psiReferenceArray.length > 0) {
|
||
return psiReferenceArray[0];
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.BracePair
|
||
* com.intellij.lang.PairedBraceMatcher
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.tree.IElementType
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.t;
|
||
import com.intellij.lang.BracePair;
|
||
import com.intellij.lang.PairedBraceMatcher;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.tree.IElementType;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class d
|
||
implements PairedBraceMatcher {
|
||
private final BracePair[] a = new BracePair[]{new BracePair(t.y, t.q, false)};
|
||
|
||
@NotNull
|
||
public BracePair[] getPairs() {
|
||
return this.a;
|
||
}
|
||
|
||
public boolean isPairedBracesAllowedBeforeType(@NotNull IElementType iElementType, @Nullable IElementType iElementType2) {
|
||
return true;
|
||
}
|
||
|
||
public int getCodeConstructStart(PsiFile psiFile, int n2) {
|
||
return n2;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.editor.colors.TextAttributesKey
|
||
* com.intellij.openapi.fileTypes.SyntaxHighlighter
|
||
* com.intellij.openapi.options.colors.AttributesDescriptor
|
||
* com.intellij.openapi.options.colors.ColorDescriptor
|
||
* com.intellij.openapi.options.colors.ColorSettingsPage
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.k;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.intellij.openapi.editor.colors.TextAttributesKey;
|
||
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
|
||
import com.intellij.openapi.options.colors.AttributesDescriptor;
|
||
import com.intellij.openapi.options.colors.ColorDescriptor;
|
||
import com.intellij.openapi.options.colors.ColorSettingsPage;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class e
|
||
implements ColorSettingsPage {
|
||
private static final AttributesDescriptor[] a = new AttributesDescriptor[]{new AttributesDescriptor("Background", k.var_com_intellij_openapi_editor_colors_TextAttributesKey_a), new AttributesDescriptor("Expression bounds", k.b), new AttributesDescriptor("Keyword", k.e), new AttributesDescriptor("Identifier", k.d), new AttributesDescriptor("Number", k.f), new AttributesDescriptor("Comma", k.g), new AttributesDescriptor("DOT", k.h), new AttributesDescriptor("Brackets", k.i)};
|
||
|
||
@Nullable
|
||
public Icon getIcon() {
|
||
return p.d();
|
||
}
|
||
|
||
@NotNull
|
||
public SyntaxHighlighter getHighlighter() {
|
||
return new k();
|
||
}
|
||
|
||
@NotNull
|
||
public String getDemoText() {
|
||
return "#{user.name,<attributeName>jdbcType</attributeName>=INTEGER}";
|
||
}
|
||
|
||
@Nullable
|
||
public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMap() {
|
||
HashMap<String, TextAttributesKey> hashMap = new HashMap<String, TextAttributesKey>();
|
||
hashMap.put("attributeName", k.e);
|
||
return hashMap;
|
||
}
|
||
|
||
@NotNull
|
||
public AttributesDescriptor[] getAttributeDescriptors() {
|
||
return a;
|
||
}
|
||
|
||
@NotNull
|
||
public ColorDescriptor[] getColorDescriptors() {
|
||
return ColorDescriptor.EMPTY_ARRAY;
|
||
}
|
||
|
||
@NotNull
|
||
public String getDisplayName() {
|
||
return "MybatisParam";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.psi.tree.IElementType
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.n;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.psi.tree.IElementType;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class f
|
||
extends IElementType {
|
||
public f(@NotNull String string) {
|
||
super(string, (Language)n.a);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.a;
|
||
import java.util.HashMap;
|
||
|
||
public class u
|
||
extends HashMap<String, String> {
|
||
private static final long a = -2417552199605158680L;
|
||
|
||
public u(String string) {
|
||
this.a(string);
|
||
}
|
||
|
||
private void a(String string) {
|
||
int n2 = this.int_a(string, 0);
|
||
if (string.charAt(n2) == '(') {
|
||
this.void_a(string, n2 + 1);
|
||
} else {
|
||
this.b(string, n2);
|
||
}
|
||
}
|
||
|
||
private void void_a(String string, int n2) {
|
||
int n3 = 1;
|
||
int n4 = n2 + 1;
|
||
while (n3 > 0) {
|
||
if (string.charAt(n4) == ')') {
|
||
--n3;
|
||
} else if (string.charAt(n4) == '(') {
|
||
++n3;
|
||
}
|
||
++n4;
|
||
}
|
||
this.put("expression", string.substring(n2, n4 - 1));
|
||
this.c(string, n4);
|
||
}
|
||
|
||
private void b(String string, int n2) {
|
||
if (n2 < string.length()) {
|
||
int n3 = this.a(string, n2, ",:");
|
||
this.put("property", this.a(string, n2, n3));
|
||
this.c(string, n3);
|
||
}
|
||
}
|
||
|
||
private int int_a(String string, int n2) {
|
||
for (int i2 = n2; i2 < string.length(); ++i2) {
|
||
if (string.charAt(i2) <= ' ') continue;
|
||
return i2;
|
||
}
|
||
return string.length();
|
||
}
|
||
|
||
private int a(String string, int n2, String string2) {
|
||
for (int i2 = n2; i2 < string.length(); ++i2) {
|
||
char c2 = string.charAt(i2);
|
||
if (string2.indexOf(c2) <= -1) continue;
|
||
return i2;
|
||
}
|
||
return string.length();
|
||
}
|
||
|
||
private void c(String string, int n2) {
|
||
if ((n2 = this.int_a(string, n2)) < string.length()) {
|
||
if (string.charAt(n2) == ':') {
|
||
this.d(string, n2 + 1);
|
||
} else if (string.charAt(n2) == ',') {
|
||
this.e(string, n2 + 1);
|
||
} else {
|
||
throw new a("Parsing error in {" + string + "} in position " + n2);
|
||
}
|
||
}
|
||
}
|
||
|
||
private void d(String string, int n2) {
|
||
int n3 = this.int_a(string, n2);
|
||
int n4 = this.a(string, n3, ",");
|
||
if (n4 <= n3) {
|
||
throw new a("Parsing error in {" + string + "} in position " + n2);
|
||
}
|
||
this.put("jdbcType", this.a(string, n3, n4));
|
||
this.e(string, n4 + 1);
|
||
}
|
||
|
||
private void e(String string, int n2) {
|
||
int n3 = this.int_a(string, n2);
|
||
if (n3 < string.length()) {
|
||
int n4 = this.a(string, n3, "=");
|
||
String string2 = this.a(string, n3, n4);
|
||
n3 = n4 + 1;
|
||
n4 = this.a(string, n3, ",");
|
||
String string3 = this.a(string, n3, n4);
|
||
this.put(string2, string3);
|
||
this.e(string, n4 + 1);
|
||
}
|
||
}
|
||
|
||
private String a(String string, int n2, int n3) {
|
||
while (string.charAt(n2) <= ' ') {
|
||
++n2;
|
||
}
|
||
while (string.charAt(n3 - 1) <= ' ') {
|
||
--n3;
|
||
}
|
||
return n2 >= n3 ? "" : string.substring(n2, n3);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.extapi.psi.PsiFileBase
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.psi.FileViewProvider
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.h;
|
||
import com.ccnode.codegenerator.O.n;
|
||
import com.intellij.extapi.psi.PsiFileBase;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.psi.FileViewProvider;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class g
|
||
extends PsiFileBase {
|
||
protected g(@NotNull FileViewProvider fileViewProvider) {
|
||
super(fileViewProvider, (Language)n.a);
|
||
}
|
||
|
||
@NotNull
|
||
public FileType getFileType() {
|
||
return h.a;
|
||
}
|
||
|
||
public String toString() {
|
||
return "param FILE";
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.openapi.fileTypes.LanguageFileType
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.n;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.openapi.fileTypes.LanguageFileType;
|
||
import javax.swing.Icon;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class h
|
||
extends LanguageFileType {
|
||
public static h a = new h();
|
||
|
||
protected h() {
|
||
super((Language)n.a);
|
||
}
|
||
|
||
@NotNull
|
||
public String getName() {
|
||
return "MybatisParam";
|
||
}
|
||
|
||
@NotNull
|
||
public String getDescription() {
|
||
return "This is mybatisParam file";
|
||
}
|
||
|
||
@NotNull
|
||
public String getDefaultExtension() {
|
||
return "mybatisParam";
|
||
}
|
||
|
||
@Nullable
|
||
public Icon getIcon() {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.fileTypes.FileType
|
||
* com.intellij.openapi.fileTypes.FileTypeConsumer
|
||
* com.intellij.openapi.fileTypes.FileTypeFactory
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.h;
|
||
import com.intellij.openapi.fileTypes.FileType;
|
||
import com.intellij.openapi.fileTypes.FileTypeConsumer;
|
||
import com.intellij.openapi.fileTypes.FileTypeFactory;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class i
|
||
extends FileTypeFactory {
|
||
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
|
||
fileTypeConsumer.consume((FileType)h.a);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lexer.Lexer
|
||
* com.intellij.openapi.editor.DefaultLanguageHighlighterColors
|
||
* com.intellij.openapi.editor.HighlighterColors
|
||
* com.intellij.openapi.editor.colors.TextAttributesKey
|
||
* com.intellij.openapi.fileTypes.SyntaxHighlighterBase
|
||
* com.intellij.psi.StringEscapesTokenTypes
|
||
* com.intellij.psi.TokenType
|
||
* com.intellij.psi.tree.IElementType
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.p;
|
||
import com.ccnode.codegenerator.O.t;
|
||
import com.intellij.lexer.Lexer;
|
||
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
|
||
import com.intellij.openapi.editor.HighlighterColors;
|
||
import com.intellij.openapi.editor.colors.TextAttributesKey;
|
||
import com.intellij.openapi.fileTypes.SyntaxHighlighterBase;
|
||
import com.intellij.psi.StringEscapesTokenTypes;
|
||
import com.intellij.psi.TokenType;
|
||
import com.intellij.psi.tree.IElementType;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class k
|
||
extends SyntaxHighlighterBase {
|
||
private static final Map<IElementType, TextAttributesKey> var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a;
|
||
public static final TextAttributesKey var_com_intellij_openapi_editor_colors_TextAttributesKey_a;
|
||
public static final TextAttributesKey b;
|
||
public static final TextAttributesKey c;
|
||
public static final TextAttributesKey d;
|
||
public static final TextAttributesKey e;
|
||
public static final TextAttributesKey f;
|
||
public static final TextAttributesKey g;
|
||
public static final TextAttributesKey h;
|
||
public static final TextAttributesKey i;
|
||
|
||
@NotNull
|
||
public Lexer getHighlightingLexer() {
|
||
return new p();
|
||
}
|
||
|
||
@NotNull
|
||
public TextAttributesKey[] getTokenHighlights(IElementType iElementType) {
|
||
return k.pack((TextAttributesKey)var_com_intellij_openapi_editor_colors_TextAttributesKey_a, (TextAttributesKey)var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.get(iElementType));
|
||
}
|
||
|
||
static {
|
||
var_com_intellij_openapi_editor_colors_TextAttributesKey_a = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.BACKGROUND", (TextAttributesKey)DefaultLanguageHighlighterColors.TEMPLATE_LANGUAGE_COLOR);
|
||
b = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.KEYWORD", (TextAttributesKey)DefaultLanguageHighlighterColors.KEYWORD);
|
||
c = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.BAD_CHARACTER", (TextAttributesKey)HighlighterColors.BAD_CHARACTER);
|
||
d = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.IDENTIFIER", (TextAttributesKey)DefaultLanguageHighlighterColors.IDENTIFIER);
|
||
e = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.KEYWORDS", (TextAttributesKey)DefaultLanguageHighlighterColors.KEYWORD);
|
||
f = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.NUMBER", (TextAttributesKey)DefaultLanguageHighlighterColors.NUMBER);
|
||
g = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.COMMA", (TextAttributesKey)DefaultLanguageHighlighterColors.COMMA);
|
||
h = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.DOT", (TextAttributesKey)DefaultLanguageHighlighterColors.DOT);
|
||
i = TextAttributesKey.createTextAttributesKey((String)"MybatisParam.BRACKETS", (TextAttributesKey)DefaultLanguageHighlighterColors.BRACKETS);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a = new HashMap<IElementType, TextAttributesKey>();
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(TokenType.BAD_CHARACTER, c);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.n, g);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.y, b);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.q, b);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.s, d);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.v, f);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.p, h);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(StringEscapesTokenTypes.VALID_STRING_ESCAPE_TOKEN, DefaultLanguageHighlighterColors.VALID_STRING_ESCAPE);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN, DefaultLanguageHighlighterColors.INVALID_STRING_ESCAPE);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN, DefaultLanguageHighlighterColors.INVALID_STRING_ESCAPE);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.t, i);
|
||
var_java_util_Map_com_intellij_psi_tree_IElementType,_com_intellij_openapi_editor_colors_TextAttributesKey__a.put(t.w, i);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.annotation.AnnotationHolder
|
||
* com.intellij.lang.annotation.Annotator
|
||
* com.intellij.lang.annotation.HighlightSeverity
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.d.b;
|
||
import com.ccnode.codegenerator.O.k;
|
||
import com.intellij.lang.annotation.AnnotationHolder;
|
||
import com.intellij.lang.annotation.Annotator;
|
||
import com.intellij.lang.annotation.HighlightSeverity;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class l
|
||
implements Annotator {
|
||
public void annotate(@NotNull PsiElement psiElement, @NotNull AnnotationHolder annotationHolder) {
|
||
if (psiElement instanceof b) {
|
||
annotationHolder.newSilentAnnotation(HighlightSeverity.INFORMATION).textAttributes(k.e).create();
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.openapi.fileTypes.SyntaxHighlighter
|
||
* com.intellij.openapi.fileTypes.SyntaxHighlighterFactory
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.vfs.VirtualFile
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.k;
|
||
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
|
||
import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.vfs.VirtualFile;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class m
|
||
extends SyntaxHighlighterFactory {
|
||
@NotNull
|
||
public SyntaxHighlighter getSyntaxHighlighter(@Nullable Project project, @Nullable VirtualFile virtualFile) {
|
||
return new k();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.intellij.lang.Language;
|
||
|
||
public class n
|
||
extends Language {
|
||
public static n a = new n();
|
||
|
||
protected n() {
|
||
super("Param");
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.ccnode.codegenerator.O.b
|
||
* com.intellij.codeInsight.completion.CompletionContributor
|
||
* com.intellij.codeInsight.completion.CompletionParameters
|
||
* com.intellij.codeInsight.completion.CompletionResultSet
|
||
* com.intellij.codeInsight.completion.InsertHandler
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElementBuilder
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.d.a;
|
||
import com.ccnode.codegenerator.O.d.b;
|
||
import com.ccnode.codegenerator.O.d.c;
|
||
import com.ccnode.codegenerator.O.d.m;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.k.d;
|
||
import com.intellij.codeInsight.completion.CompletionContributor;
|
||
import com.intellij.codeInsight.completion.CompletionParameters;
|
||
import com.intellij.codeInsight.completion.CompletionResultSet;
|
||
import com.intellij.codeInsight.completion.InsertHandler;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||
import com.intellij.psi.PsiElement;
|
||
import java.util.Iterator;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class o
|
||
extends CompletionContributor {
|
||
public void fillCompletionVariants(@NotNull CompletionParameters completionParameters, @NotNull CompletionResultSet completionResultSet) {
|
||
a a2;
|
||
b b2;
|
||
PsiElement psiElement;
|
||
PsiElement psiElement2;
|
||
PsiElement psiElement3 = completionParameters.getPosition();
|
||
if (psiElement3.getParent() != null && psiElement3.getParent() instanceof b) {
|
||
Iterator iterator = d.var_java_lang_String_a.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
completionResultSet.addElement((LookupElement)LookupElementBuilder.create((String)string).withIcon(p.d()).withPresentableText(string).withInsertHandler((InsertHandler)com.ccnode.codegenerator.O.b.a.f()));
|
||
}
|
||
} else if (psiElement3.getParent() instanceof m && (psiElement2 = psiElement3.getParent().getParent()) instanceof c && (psiElement = psiElement2.getParent()) instanceof a && (b2 = (a2 = (a)psiElement).com_ccnode_codegenerator_O_d_b_a()).getText().equals("mode")) {
|
||
Iterator iterator = d.var_java_lang_String_b.iterator();
|
||
while (iterator.hasNext()) {
|
||
String string = (String)iterator.next();
|
||
completionResultSet.addElement((LookupElement)LookupElementBuilder.create((String)string).withIcon(p.d()).withTypeText("MODE"));
|
||
}
|
||
}
|
||
super.fillCompletionVariants(completionParameters, completionResultSet);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lexer.FlexAdapter
|
||
* com.intellij.lexer.FlexLexer
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.v;
|
||
import com.intellij.lexer.FlexAdapter;
|
||
import com.intellij.lexer.FlexLexer;
|
||
|
||
public class p
|
||
extends FlexAdapter {
|
||
public p() {
|
||
super((FlexLexer)new v());
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.lang.Language
|
||
* com.intellij.lang.ParserDefinition
|
||
* com.intellij.lang.ParserDefinition$SpaceRequirements
|
||
* com.intellij.lang.PsiParser
|
||
* com.intellij.lexer.Lexer
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.psi.FileViewProvider
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.TokenType
|
||
* com.intellij.psi.tree.IElementType
|
||
* com.intellij.psi.tree.IFileElementType
|
||
* com.intellij.psi.tree.TokenSet
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.c.a;
|
||
import com.ccnode.codegenerator.O.g;
|
||
import com.ccnode.codegenerator.O.n;
|
||
import com.ccnode.codegenerator.O.p;
|
||
import com.ccnode.codegenerator.O.t;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.lang.ParserDefinition;
|
||
import com.intellij.lang.PsiParser;
|
||
import com.intellij.lexer.Lexer;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.psi.FileViewProvider;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.TokenType;
|
||
import com.intellij.psi.tree.IElementType;
|
||
import com.intellij.psi.tree.IFileElementType;
|
||
import com.intellij.psi.tree.TokenSet;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class q
|
||
implements ParserDefinition {
|
||
public static final TokenSet var_com_intellij_psi_tree_TokenSet_a;
|
||
public static final TokenSet b;
|
||
public static final IFileElementType var_com_intellij_psi_tree_IFileElementType_a;
|
||
|
||
@NotNull
|
||
public Lexer createLexer(Project project) {
|
||
return new p();
|
||
}
|
||
|
||
public PsiParser createParser(Project project) {
|
||
return new a();
|
||
}
|
||
|
||
public IFileElementType getFileNodeType() {
|
||
return var_com_intellij_psi_tree_IFileElementType_a;
|
||
}
|
||
|
||
@NotNull
|
||
public TokenSet getCommentTokens() {
|
||
return b;
|
||
}
|
||
|
||
@NotNull
|
||
public TokenSet getStringLiteralElements() {
|
||
return TokenSet.EMPTY;
|
||
}
|
||
|
||
@NotNull
|
||
public PsiElement createElement(ASTNode aSTNode) {
|
||
return t.a.a(aSTNode);
|
||
}
|
||
|
||
public PsiFile createFile(FileViewProvider fileViewProvider) {
|
||
return new g(fileViewProvider);
|
||
}
|
||
|
||
public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode aSTNode, ASTNode aSTNode2) {
|
||
return ParserDefinition.SpaceRequirements.MAY;
|
||
}
|
||
|
||
static {
|
||
var_com_intellij_psi_tree_TokenSet_a = TokenSet.create((IElementType[])new IElementType[]{TokenType.WHITE_SPACE});
|
||
b = TokenSet.create((IElementType[])new IElementType[]{t.o});
|
||
var_com_intellij_psi_tree_IFileElementType_a = new IFileElementType((Language)n.a);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.extapi.psi.ASTWrapperPsiElement
|
||
* com.intellij.ide.projectView.PresentationData
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.navigation.ItemPresentation
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.ElementManipulators
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.util.PlatformIcons
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.n.h_0;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.extapi.psi.ASTWrapperPsiElement;
|
||
import com.intellij.ide.projectView.PresentationData;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.navigation.ItemPresentation;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.ElementManipulators;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.util.PlatformIcons;
|
||
import java.util.ArrayList;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public abstract class r
|
||
extends ASTWrapperPsiElement {
|
||
public r(@NotNull ASTNode aSTNode) {
|
||
super(aSTNode);
|
||
}
|
||
|
||
public ItemPresentation getPresentation() {
|
||
return new PresentationData(this.getText(), null, PlatformIcons.PARAMETER_ICON, null);
|
||
}
|
||
|
||
@NotNull
|
||
public PsiReference[] getReferences() {
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
String string = this.getText();
|
||
TextRange textRange = ElementManipulators.getValueTextRange((PsiElement)this);
|
||
if (!string.contains(".")) {
|
||
arrayList.add(new h_0((PsiElement)this, this.getText(), this.getText(), "", textRange, false));
|
||
} else {
|
||
String[] stringArray = string.split("\\.");
|
||
int n2 = textRange.getStartOffset();
|
||
StringBuilder stringBuilder = new StringBuilder();
|
||
for (int i2 = 0; i2 < stringArray.length; ++i2) {
|
||
String string2 = stringArray[i2];
|
||
String string3 = stringBuilder.toString();
|
||
if (i2 == 0) {
|
||
stringBuilder.append(string2);
|
||
arrayList.add(new h_0((PsiElement)this, string2, stringBuilder.toString(), "", new TextRange(n2, n2 + string2.length()), false));
|
||
} else {
|
||
stringBuilder.append("." + string2);
|
||
int n3 = n2 + string2.length();
|
||
if (n3 > textRange.getEndOffset()) {
|
||
n3 = textRange.getEndOffset();
|
||
}
|
||
arrayList.add(new h_0((PsiElement)this, string2, stringBuilder.toString(), string3, new TextRange(n2, n3), false));
|
||
}
|
||
n2 = n2 + string2.length() + 1;
|
||
}
|
||
}
|
||
return arrayList.toArray(new PsiReference[0]);
|
||
}
|
||
|
||
public PsiReference getReference() {
|
||
PsiReference[] psiReferenceArray = this.getReferences();
|
||
if (psiReferenceArray.length > 0) {
|
||
return psiReferenceArray[0];
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.Language
|
||
* com.intellij.psi.tree.IElementType
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.n;
|
||
import com.intellij.lang.Language;
|
||
import com.intellij.psi.tree.IElementType;
|
||
|
||
public class s
|
||
extends IElementType {
|
||
public s(String string) {
|
||
super(string, (Language)n.a);
|
||
}
|
||
|
||
public String toString() {
|
||
return "ParamTokenType." + super.toString();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.tree.IElementType
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import a.a.a.b;
|
||
import a.a.a.c;
|
||
import a.a.a.d;
|
||
import a.a.a.e;
|
||
import a.a.a.g;
|
||
import a.a.a.h;
|
||
import a.a.a.i;
|
||
import a.a.a.j;
|
||
import a.a.a.k;
|
||
import a.a.a.l;
|
||
import com.ccnode.codegenerator.O.f;
|
||
import com.ccnode.codegenerator.O.s;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.tree.IElementType;
|
||
|
||
public interface t {
|
||
public static final IElementType a = new f("ATTRIBUTE");
|
||
public static final IElementType b = new f("ATTRIBUTES");
|
||
public static final IElementType c = new f("ATTRIBUTE_NAME");
|
||
public static final IElementType d = new f("ATTRIBUTE_VALUE");
|
||
public static final IElementType e = new f("EXPRESSION");
|
||
public static final IElementType f = new f("EXPRESSION_INFO");
|
||
public static final IElementType g = new f("OLD_JDBC_TYPE");
|
||
public static final IElementType h = new f("ONE_EXPRESS");
|
||
public static final IElementType i = new f("ONE_JDBC_TYPE");
|
||
public static final IElementType j = new f("PROPERTY_NAME");
|
||
public static final IElementType k = new f("REFERENCE_EXPRESSION");
|
||
public static final IElementType l = new f("RULE_WITH_BRACKET");
|
||
public static final IElementType m = new s(":");
|
||
public static final IElementType n = new s(",");
|
||
public static final IElementType o = new s("comment");
|
||
public static final IElementType p = new s(".");
|
||
public static final IElementType q = new s("}");
|
||
public static final IElementType r = new s("=");
|
||
public static final IElementType s = new s("ID");
|
||
public static final IElementType t = new s("(");
|
||
public static final IElementType u = new s("[");
|
||
public static final IElementType v = new s("NUMBER");
|
||
public static final IElementType w = new s(")");
|
||
public static final IElementType x = new s("]");
|
||
public static final IElementType y = new s("#{");
|
||
|
||
public static class a {
|
||
public static PsiElement a(ASTNode aSTNode) {
|
||
IElementType iElementType = aSTNode.getElementType();
|
||
if (iElementType == a) {
|
||
return new a.a.a.a(aSTNode);
|
||
}
|
||
if (iElementType == b) {
|
||
return new d(aSTNode);
|
||
}
|
||
if (iElementType == c) {
|
||
return new b(aSTNode);
|
||
}
|
||
if (iElementType == d) {
|
||
return new c(aSTNode);
|
||
}
|
||
if (iElementType == e) {
|
||
return new e(aSTNode);
|
||
}
|
||
if (iElementType == f) {
|
||
return new a.a.a.f(aSTNode);
|
||
}
|
||
if (iElementType == g) {
|
||
return new g(aSTNode);
|
||
}
|
||
if (iElementType == h) {
|
||
return new h(aSTNode);
|
||
}
|
||
if (iElementType == i) {
|
||
return new i(aSTNode);
|
||
}
|
||
if (iElementType == j) {
|
||
return new j(aSTNode);
|
||
}
|
||
if (iElementType == k) {
|
||
return new k(aSTNode);
|
||
}
|
||
if (iElementType == l) {
|
||
return new l(aSTNode);
|
||
}
|
||
throw new AssertionError((Object)("Unknown element type: " + iElementType));
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.ASTNode
|
||
* com.intellij.lang.LightPsiParser
|
||
* com.intellij.lang.PsiBuilder
|
||
* com.intellij.lang.PsiBuilder$Marker
|
||
* com.intellij.lang.PsiParser
|
||
* com.intellij.lang.parser.GeneratedParserUtilBase$Parser
|
||
* com.intellij.psi.tree.IElementType
|
||
*/
|
||
package com.ccnode.codegenerator.O.c;
|
||
|
||
import com.ccnode.codegenerator.O.c.b;
|
||
import com.ccnode.codegenerator.O.t;
|
||
import com.intellij.lang.ASTNode;
|
||
import com.intellij.lang.LightPsiParser;
|
||
import com.intellij.lang.PsiBuilder;
|
||
import com.intellij.lang.PsiParser;
|
||
import com.intellij.lang.parser.GeneratedParserUtilBase;
|
||
import com.intellij.psi.tree.IElementType;
|
||
|
||
public class a
|
||
implements LightPsiParser,
|
||
PsiParser {
|
||
public ASTNode parse(IElementType iElementType, PsiBuilder psiBuilder) {
|
||
this.parseLight(iElementType, psiBuilder);
|
||
return psiBuilder.getTreeBuilt();
|
||
}
|
||
|
||
public void parseLight(IElementType iElementType, PsiBuilder psiBuilder) {
|
||
psiBuilder = b.adapt_builder_((IElementType)iElementType, (PsiBuilder)psiBuilder, (PsiParser)this, null);
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)0, (int)1, null);
|
||
boolean bl = this.a(iElementType, psiBuilder);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)0, (PsiBuilder.Marker)marker, (IElementType)iElementType, (boolean)bl, (boolean)true, (GeneratedParserUtilBase.Parser)b.TRUE_CONDITION);
|
||
}
|
||
|
||
protected boolean a(IElementType iElementType, PsiBuilder psiBuilder) {
|
||
return a.a(iElementType, psiBuilder, 0);
|
||
}
|
||
|
||
static boolean a(IElementType iElementType, PsiBuilder psiBuilder, int n2) {
|
||
return a.a(psiBuilder, n2 + 1);
|
||
}
|
||
|
||
static boolean a(PsiBuilder psiBuilder, int n2) {
|
||
boolean bl;
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.y)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)0);
|
||
boolean bl2 = bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.y);
|
||
bl = bl && b.report_error_((PsiBuilder)psiBuilder, (boolean)a.p(psiBuilder, n2 + 1));
|
||
bl = bl2 && b.report_error_((PsiBuilder)psiBuilder, (boolean)a.t(psiBuilder, n2 + 1)) && bl;
|
||
bl = bl2 && b.report_error_((PsiBuilder)psiBuilder, (boolean)a.f(psiBuilder, n2 + 1)) && bl;
|
||
bl = bl2 && b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.q) && bl;
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)bl, (boolean)bl2, null);
|
||
return bl || bl2;
|
||
}
|
||
|
||
private static boolean p(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile_1")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = a.q(psiBuilder, n2 + 1);
|
||
if (!bl) {
|
||
bl = a.g(psiBuilder, n2 + 1);
|
||
}
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean q(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile_1_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = a.m(psiBuilder, n2 + 1);
|
||
bl = bl && a.r(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean r(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile_1_0_1")) {
|
||
return false;
|
||
}
|
||
a.s(psiBuilder, n2 + 1);
|
||
return true;
|
||
}
|
||
|
||
private static boolean s(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile_1_0_1_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = a.i(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean t(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile_2")) {
|
||
return false;
|
||
}
|
||
a.u(psiBuilder, n2 + 1);
|
||
return true;
|
||
}
|
||
|
||
private static boolean u(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ParamFile_2_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = a.j(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean b(PsiBuilder psiBuilder, int n2) {
|
||
boolean bl;
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attribute")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)0, (IElementType)t.a, (String)"<attribute>");
|
||
boolean bl2 = bl = a.c(psiBuilder, n2 + 1);
|
||
bl = bl && b.report_error_((PsiBuilder)psiBuilder, (boolean)b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.r));
|
||
bl = bl2 && a.d(psiBuilder, n2 + 1) && bl;
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)bl, (boolean)bl2, a::e);
|
||
return bl || bl2;
|
||
}
|
||
|
||
public static boolean c(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attributeName")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.s)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.s);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.c, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean d(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attributeValue")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (String)"<attribute value>", (IElementType[])new IElementType[]{t.s, t.v})) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)0, (IElementType)t.d, (String)"<attribute value>");
|
||
boolean bl = a.n(psiBuilder, n2 + 1);
|
||
if (!bl) {
|
||
bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.v);
|
||
}
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)bl, (boolean)false, null);
|
||
return bl;
|
||
}
|
||
|
||
static boolean e(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attribute_recover")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)16);
|
||
boolean bl = !a.v(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)bl, (boolean)false, null);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean v(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attribute_recover_0")) {
|
||
return false;
|
||
}
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.q);
|
||
if (!bl) {
|
||
bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.n);
|
||
}
|
||
return bl;
|
||
}
|
||
|
||
public static boolean f(PsiBuilder psiBuilder, int n2) {
|
||
int n3;
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attributes")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)0, (IElementType)t.b, (String)"<attributes>");
|
||
do {
|
||
n3 = b.current_position_((PsiBuilder)psiBuilder);
|
||
} while (a.w(psiBuilder, n2 + 1) && b.empty_element_parsed_guard_((PsiBuilder)psiBuilder, (String)"attributes", (int)n3));
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)true, (boolean)false, null);
|
||
return true;
|
||
}
|
||
|
||
private static boolean w(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"attributes_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.n);
|
||
bl = bl && a.b(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean g(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"expression")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.t)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.t);
|
||
bl = bl && a.h(psiBuilder, n2 + 1);
|
||
bl = bl && b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.w);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.e, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean h(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"expressionInfo")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)0, (IElementType)t.f, (String)"<expression info>");
|
||
boolean bl = a.x(psiBuilder, n2 + 1);
|
||
while (bl) {
|
||
int n3 = b.current_position_((PsiBuilder)psiBuilder);
|
||
if (a.x(psiBuilder, n2 + 1) && b.empty_element_parsed_guard_((PsiBuilder)psiBuilder, (String)"expressionInfo", (int)n3)) continue;
|
||
break;
|
||
}
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)bl, (boolean)false, null);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean x(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"expressionInfo_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = a.k(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
static boolean i(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"indexName")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.u)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeTokens((PsiBuilder)psiBuilder, (int)0, (IElementType[])new IElementType[]{t.u, t.v, t.x});
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean j(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"oldJdbcType")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.m)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.m);
|
||
bl = bl && a.l(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.g, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean k(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"oneExpress")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder, (int)n2, (int)0, (IElementType)t.h, (String)"<one express>");
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.s);
|
||
if (!bl) {
|
||
bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.n);
|
||
}
|
||
if (!bl) {
|
||
bl = a.o(psiBuilder, n2 + 1);
|
||
}
|
||
if (!bl) {
|
||
bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.p);
|
||
}
|
||
if (!bl) {
|
||
bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.v);
|
||
}
|
||
b.exit_section_((PsiBuilder)psiBuilder, (int)n2, (PsiBuilder.Marker)marker, (boolean)bl, (boolean)false, null);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean l(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"oneJdbcType")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.s)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.s);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.i, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean m(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"propertyName")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.s)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.s);
|
||
bl = bl && a.y(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.j, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean y(PsiBuilder psiBuilder, int n2) {
|
||
int n3;
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"propertyName_1")) {
|
||
return false;
|
||
}
|
||
do {
|
||
n3 = b.current_position_((PsiBuilder)psiBuilder);
|
||
} while (a.z(psiBuilder, n2 + 1) && b.empty_element_parsed_guard_((PsiBuilder)psiBuilder, (String)"propertyName_1", (int)n3));
|
||
return true;
|
||
}
|
||
|
||
private static boolean z(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"propertyName_1_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeTokens((PsiBuilder)psiBuilder, (int)0, (IElementType[])new IElementType[]{t.p, t.s});
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean n(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"referenceExpression")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.s)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.s);
|
||
bl = bl && a.A(psiBuilder, n2 + 1);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.k, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean A(PsiBuilder psiBuilder, int n2) {
|
||
int n3;
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"referenceExpression_1")) {
|
||
return false;
|
||
}
|
||
do {
|
||
n3 = b.current_position_((PsiBuilder)psiBuilder);
|
||
} while (a.B(psiBuilder, n2 + 1) && b.empty_element_parsed_guard_((PsiBuilder)psiBuilder, (String)"referenceExpression_1", (int)n3));
|
||
return true;
|
||
}
|
||
|
||
private static boolean B(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"referenceExpression_1_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeTokens((PsiBuilder)psiBuilder, (int)0, (IElementType[])new IElementType[]{t.p, t.s});
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
public static boolean o(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ruleWithBracket")) {
|
||
return false;
|
||
}
|
||
if (!b.nextTokenIs((PsiBuilder)psiBuilder, (IElementType)t.t)) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = a.C(psiBuilder, n2 + 1);
|
||
if (!bl) {
|
||
bl = b.parseTokens((PsiBuilder)psiBuilder, (int)0, (IElementType[])new IElementType[]{t.t, t.w});
|
||
}
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, (IElementType)t.l, (boolean)bl);
|
||
return bl;
|
||
}
|
||
|
||
private static boolean C(PsiBuilder psiBuilder, int n2) {
|
||
if (!b.recursion_guard_((PsiBuilder)psiBuilder, (int)n2, (String)"ruleWithBracket_0")) {
|
||
return false;
|
||
}
|
||
PsiBuilder.Marker marker = b.enter_section_((PsiBuilder)psiBuilder);
|
||
boolean bl = b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.t);
|
||
bl = bl && a.k(psiBuilder, n2 + 1);
|
||
bl = bl && b.consumeToken((PsiBuilder)psiBuilder, (IElementType)t.w);
|
||
b.exit_section_((PsiBuilder)psiBuilder, (PsiBuilder.Marker)marker, null, (boolean)bl);
|
||
return bl;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lang.parser.GeneratedParserUtilBase
|
||
*/
|
||
package com.ccnode.codegenerator.O.c;
|
||
|
||
import com.intellij.lang.parser.GeneratedParserUtilBase;
|
||
|
||
public class b
|
||
extends GeneratedParserUtilBase {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.b;
|
||
import com.ccnode.codegenerator.O.d.c;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public interface a
|
||
extends PsiElement {
|
||
@NotNull
|
||
public b com_ccnode_codegenerator_O_d_b_a();
|
||
|
||
@Nullable
|
||
public c com_ccnode_codegenerator_O_d_c_a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface b
|
||
extends PsiElement {
|
||
@NotNull
|
||
public PsiElement a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.a;
|
||
import com.intellij.psi.PsiElement;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface d
|
||
extends PsiElement {
|
||
@NotNull
|
||
public List<a> a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.m;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public interface c
|
||
extends PsiElement {
|
||
@Nullable
|
||
public m com_ccnode_codegenerator_O_d_m_a();
|
||
|
||
@Nullable
|
||
public PsiElement com_intellij_psi_PsiElement_a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
|
||
public interface e
|
||
extends PsiElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
|
||
public interface f
|
||
extends PsiElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.h;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface g
|
||
extends PsiElement {
|
||
@NotNull
|
||
public h a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.j;
|
||
import com.intellij.psi.PsiElement;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface h
|
||
extends PsiElement {
|
||
@NotNull
|
||
public List<j> a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.k;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface i
|
||
extends PsiElement {
|
||
@NotNull
|
||
public k a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.n;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public interface j
|
||
extends PsiElement {
|
||
@Nullable
|
||
public n com_ccnode_codegenerator_O_d_n_a();
|
||
|
||
@Nullable
|
||
public PsiElement com_intellij_psi_PsiElement_a();
|
||
|
||
@Nullable
|
||
public PsiElement b();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface k
|
||
extends PsiElement {
|
||
@NotNull
|
||
public PsiElement a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
|
||
public interface l
|
||
extends PsiElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
|
||
public interface m
|
||
extends PsiElement {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.j;
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public interface n
|
||
extends PsiElement {
|
||
@Nullable
|
||
public j a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public interface o
|
||
extends PsiElement {
|
||
@Nullable
|
||
public PsiElement a();
|
||
|
||
@Nullable
|
||
public PsiElement b();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.intellij.psi.PsiElement;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public interface p
|
||
extends PsiElement {
|
||
@NotNull
|
||
public PsiElement a();
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiElementVisitor
|
||
* org.jetbrains.annotations.NotNull
|
||
*/
|
||
package com.ccnode.codegenerator.O.d;
|
||
|
||
import com.ccnode.codegenerator.O.d.a;
|
||
import com.ccnode.codegenerator.O.d.b;
|
||
import com.ccnode.codegenerator.O.d.c;
|
||
import com.ccnode.codegenerator.O.d.d;
|
||
import com.ccnode.codegenerator.O.d.g;
|
||
import com.ccnode.codegenerator.O.d.h;
|
||
import com.ccnode.codegenerator.O.d.i;
|
||
import com.ccnode.codegenerator.O.d.j;
|
||
import com.ccnode.codegenerator.O.d.k;
|
||
import com.ccnode.codegenerator.O.d.l;
|
||
import com.ccnode.codegenerator.O.d.m;
|
||
import com.ccnode.codegenerator.O.d.n;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiElementVisitor;
|
||
import org.jetbrains.annotations.NotNull;
|
||
|
||
public class q
|
||
extends PsiElementVisitor {
|
||
public void a(@NotNull a a2) {
|
||
this.a((PsiElement)a2);
|
||
}
|
||
|
||
public void a(@NotNull b b2) {
|
||
this.a((PsiElement)b2);
|
||
}
|
||
|
||
public void a(@NotNull c c2) {
|
||
this.a((PsiElement)c2);
|
||
}
|
||
|
||
public void a(@NotNull d d2) {
|
||
this.a((PsiElement)d2);
|
||
}
|
||
|
||
public void a(@NotNull g g2) {
|
||
this.a((PsiElement)g2);
|
||
}
|
||
|
||
public void a(@NotNull h h2) {
|
||
this.a((PsiElement)h2);
|
||
}
|
||
|
||
public void a(@NotNull i i2) {
|
||
this.a((PsiElement)i2);
|
||
}
|
||
|
||
public void a(@NotNull j j2) {
|
||
this.a((PsiElement)j2);
|
||
}
|
||
|
||
public void a(@NotNull k k2) {
|
||
this.a((PsiElement)k2);
|
||
}
|
||
|
||
public void a(@NotNull l l2) {
|
||
this.a((PsiElement)l2);
|
||
}
|
||
|
||
public void a(@NotNull m m2) {
|
||
this.a((PsiElement)m2);
|
||
}
|
||
|
||
public void a(@NotNull n n2) {
|
||
this.a((PsiElement)n2);
|
||
}
|
||
|
||
public void a(@NotNull PsiElement psiElement) {
|
||
this.visitElement(psiElement);
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.completion.JavaLookupElementBuilder
|
||
* com.intellij.codeInsight.completion.PrioritizedLookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElementBuilder
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiField
|
||
* com.intellij.psi.PsiMethod
|
||
* com.intellij.psi.PsiParameter
|
||
* com.intellij.psi.PsiReference
|
||
* com.intellij.psi.PsiReferenceBase
|
||
* com.intellij.psi.impl.source.resolve.ResolveCache
|
||
* com.intellij.psi.impl.source.resolve.ResolveCache$AbstractResolver
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.util.PsiTreeUtil
|
||
* com.intellij.psi.xml.XmlAttributeValue
|
||
* com.intellij.util.ObjectUtils
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.e;
|
||
|
||
import com.ccnode.codegenerator.O.g;
|
||
import com.ccnode.codegenerator.O.r;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.completion.JavaLookupElementBuilder;
|
||
import com.intellij.codeInsight.completion.PrioritizedLookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiField;
|
||
import com.intellij.psi.PsiMethod;
|
||
import com.intellij.psi.PsiParameter;
|
||
import com.intellij.psi.PsiReference;
|
||
import com.intellij.psi.PsiReferenceBase;
|
||
import com.intellij.psi.impl.source.resolve.ResolveCache;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.util.PsiTreeUtil;
|
||
import com.intellij.psi.xml.XmlAttributeValue;
|
||
import com.intellij.util.ObjectUtils;
|
||
import java.util.ArrayList;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class a
|
||
extends PsiReferenceBase<PsiElement> {
|
||
public a(PsiElement psiElement, TextRange textRange, boolean bl) {
|
||
super(psiElement, textRange, bl);
|
||
}
|
||
|
||
@Nullable
|
||
public PsiElement resolve() {
|
||
Project project = this.myElement.getProject();
|
||
PsiElement psiElement = (PsiElement)ResolveCache.getInstance((Project)project).resolveWithCaching((PsiReference)this, (ResolveCache.AbstractResolver)a.a, false, false);
|
||
return psiElement;
|
||
}
|
||
|
||
@NotNull
|
||
public Object[] getVariants() {
|
||
PsiElement psiElement;
|
||
PsiField psiField2;
|
||
PsiField[] psiFieldArray;
|
||
g g2;
|
||
r r2;
|
||
PsiElement psiElement2;
|
||
ArrayList arrayList = Lists.newArrayList();
|
||
PsiElement psiElement3 = this.myElement.getParent();
|
||
if (psiElement3 != null && (psiElement2 = psiElement3.getParent()) instanceof com.ccnode.codegenerator.O.d.a && (r2 = (r)PsiTreeUtil.getChildOfType((PsiElement)(g2 = (g)((Object)ObjectUtils.tryCast((Object)(psiFieldArray = psiElement2.getContainingFile()), g.class))), r.class)) != null && ((PsiReference[])(psiField2 = r2.getReferences())).length > 0 && (psiElement = psiField2[((PsiField)psiField2).length - 1].resolve()) != null) {
|
||
Object object;
|
||
String string = null;
|
||
if (psiElement instanceof PsiParameter) {
|
||
object = (PsiParameter)psiElement;
|
||
var11_13 = object.getType();
|
||
string = var12_14 = var11_13.getCanonicalText();
|
||
} else if (psiElement instanceof PsiField) {
|
||
object = (PsiField)psiElement;
|
||
var11_13 = object.getType();
|
||
string = var12_14 = var11_13.getCanonicalText();
|
||
} else if (psiElement instanceof PsiMethod) {
|
||
object = ((PsiMethod)psiElement).getReturnType();
|
||
string = object.getCanonicalText();
|
||
}
|
||
if (string != null && (object = com.ccnode.codegenerator.l.a.f.a.var_com_ccnode_codegenerator_l_a_f_a_a.a(string)) != null) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)LookupElementBuilder.create((String)object).withTypeText("mybatis").withIcon(p.d()), (double)1.0));
|
||
}
|
||
}
|
||
if ((psiElement2 = JavaPsiFacade.getInstance((Project)this.myElement.getProject()).findClass("org.apache.ibatis.type.JdbcType", GlobalSearchScope.allScope((Project)this.myElement.getProject()))) != null) {
|
||
for (PsiField psiField2 : psiElement2.getFields()) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)JavaLookupElementBuilder.forField((PsiField)psiField2), (double)0.5));
|
||
}
|
||
}
|
||
return arrayList.toArray(new LookupElement[0]);
|
||
}
|
||
|
||
static class a
|
||
implements ResolveCache.AbstractResolver<a, PsiElement> {
|
||
public static a a = new a();
|
||
|
||
a() {
|
||
}
|
||
|
||
public PsiElement a(@NotNull a a2, boolean bl) {
|
||
PsiField[] psiFieldArray;
|
||
PsiElement psiElement = a2.myElement;
|
||
Project project = psiElement.getProject();
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass("org.apache.ibatis.type.JdbcType", GlobalSearchScope.allScope((Project)project));
|
||
String string = psiElement.getText();
|
||
if (psiElement instanceof XmlAttributeValue) {
|
||
psiFieldArray = (PsiField[])psiElement;
|
||
string = psiFieldArray.getValue();
|
||
}
|
||
if (psiClass != null) {
|
||
for (PsiField psiField : psiFieldArray = psiClass.getFields()) {
|
||
String string2 = psiField.getName();
|
||
if (string2 == null || !string2.equals(string)) continue;
|
||
return psiField.getNameIdentifier();
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
public /* synthetic */ Object resolve(@NotNull PsiReference psiReference, boolean bl) {
|
||
return this.a((a)psiReference, bl);
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.base.Function
|
||
* com.google.common.collect.Collections2
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.completion.JavaClassNameCompletionContributor
|
||
* com.intellij.codeInsight.completion.PrioritizedLookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElementBuilder
|
||
* com.intellij.openapi.module.ModuleUtilCore
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.JavaPsiFacade
|
||
* com.intellij.psi.PsiClass
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiReferenceBase
|
||
* com.intellij.psi.search.GlobalSearchScope
|
||
* com.intellij.psi.search.GlobalSearchScopesCore
|
||
* com.intellij.psi.search.SearchScope
|
||
* com.intellij.psi.search.searches.AllClassesSearch
|
||
* com.intellij.psi.search.searches.ClassInheritorsSearch
|
||
* com.intellij.util.Query
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.e;
|
||
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.c.c;
|
||
import com.google.common.base.Function;
|
||
import com.google.common.collect.Collections2;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.completion.JavaClassNameCompletionContributor;
|
||
import com.intellij.codeInsight.completion.PrioritizedLookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||
import com.intellij.openapi.module.ModuleUtilCore;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.JavaPsiFacade;
|
||
import com.intellij.psi.PsiClass;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiReferenceBase;
|
||
import com.intellij.psi.search.GlobalSearchScope;
|
||
import com.intellij.psi.search.GlobalSearchScopesCore;
|
||
import com.intellij.psi.search.SearchScope;
|
||
import com.intellij.psi.search.searches.AllClassesSearch;
|
||
import com.intellij.psi.search.searches.ClassInheritorsSearch;
|
||
import com.intellij.util.Query;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class b
|
||
extends PsiReferenceBase<PsiElement> {
|
||
private Function<com.ccnode.codegenerator.c.b, String> var_com_google_common_base_Function_com_ccnode_codegenerator_c_b,_java_lang_String__a = b2 -> b2.java_lang_String_a();
|
||
private boolean var_boolean_a;
|
||
|
||
public b(PsiElement psiElement, TextRange textRange, boolean bl, boolean bl2) {
|
||
super(psiElement, textRange, bl);
|
||
this.var_boolean_a = bl2;
|
||
}
|
||
|
||
@Nullable
|
||
public PsiElement resolve() {
|
||
return (PsiElement)c.a(this.myElement.getProject()).a(this.myElement, this.myElement.getText()).orNull();
|
||
}
|
||
|
||
@NotNull
|
||
public Object[] getVariants() {
|
||
ArrayList arrayList;
|
||
block5: {
|
||
Project project;
|
||
block4: {
|
||
String string2;
|
||
arrayList = Lists.newArrayList();
|
||
project = this.getElement().getProject();
|
||
if (!this.var_boolean_a) break block4;
|
||
c c2 = c.a(project);
|
||
Collection collection = Collections2.transform(c2.a(this.getElement()), this.var_com_google_common_base_Function_com_ccnode_codegenerator_c_b,_java_lang_String__a);
|
||
for (String string2 : collection) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)LookupElementBuilder.create((String)string2).withTypeText("(alias)").withIcon(p.d()), (double)1.0));
|
||
}
|
||
Project project2 = this.myElement.getProject();
|
||
string2 = ModuleUtilCore.findModuleForPsiElement((PsiElement)this.myElement);
|
||
if (string2 == null) break block5;
|
||
Collection collection2 = AllClassesSearch.search((SearchScope)GlobalSearchScopesCore.projectProductionScope((Project)project2), (Project)project2).findAll();
|
||
for (PsiClass psiClass : collection2) {
|
||
if (psiClass.isInterface() || psiClass.isEnum()) continue;
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)JavaClassNameCompletionContributor.createClassLookupItem((PsiClass)psiClass, (boolean)false), (double)0.8));
|
||
}
|
||
break block5;
|
||
}
|
||
PsiClass psiClass = JavaPsiFacade.getInstance((Project)project).findClass("org.apache.ibatis.type.TypeHandler", GlobalSearchScope.allScope((Project)project));
|
||
if (psiClass != null) {
|
||
Query query = ClassInheritorsSearch.search((PsiClass)psiClass, (SearchScope)GlobalSearchScope.allScope((Project)project), (boolean)true);
|
||
Collection collection = query.findAll();
|
||
for (PsiClass psiClass2 : collection) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)JavaClassNameCompletionContributor.createClassLookupItem((PsiClass)psiClass2, (boolean)false), (double)0.8));
|
||
}
|
||
}
|
||
}
|
||
return arrayList.toArray(new LookupElement[arrayList.size()]);
|
||
}
|
||
|
||
public boolean isSoft() {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.google.common.collect.Lists
|
||
* com.intellij.codeInsight.completion.PrioritizedLookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElement
|
||
* com.intellij.codeInsight.lookup.LookupElementBuilder
|
||
* com.intellij.lang.injection.InjectedLanguageManager
|
||
* com.intellij.openapi.project.Project
|
||
* com.intellij.openapi.util.TextRange
|
||
* com.intellij.psi.PsiElement
|
||
* com.intellij.psi.PsiFile
|
||
* com.intellij.psi.PsiLanguageInjectionHost
|
||
* com.intellij.psi.PsiReferenceBase
|
||
* com.intellij.psi.xml.XmlFile
|
||
* com.intellij.util.xml.GenericAttributeValue
|
||
* org.jetbrains.annotations.NotNull
|
||
* org.jetbrains.annotations.Nullable
|
||
*/
|
||
package com.ccnode.codegenerator.O.e;
|
||
|
||
import com.ccnode.codegenerator.ad.d_0;
|
||
import com.ccnode.codegenerator.ad.p;
|
||
import com.ccnode.codegenerator.ad.v;
|
||
import com.ccnode.codegenerator.dom.model.Mapper;
|
||
import com.ccnode.codegenerator.dom.model.ResultMap;
|
||
import com.google.common.collect.Lists;
|
||
import com.intellij.codeInsight.completion.PrioritizedLookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElement;
|
||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||
import com.intellij.lang.injection.InjectedLanguageManager;
|
||
import com.intellij.openapi.project.Project;
|
||
import com.intellij.openapi.util.TextRange;
|
||
import com.intellij.psi.PsiElement;
|
||
import com.intellij.psi.PsiFile;
|
||
import com.intellij.psi.PsiLanguageInjectionHost;
|
||
import com.intellij.psi.PsiReferenceBase;
|
||
import com.intellij.psi.xml.XmlFile;
|
||
import com.intellij.util.xml.GenericAttributeValue;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.List;
|
||
import org.jetbrains.annotations.NotNull;
|
||
import org.jetbrains.annotations.Nullable;
|
||
|
||
public class c
|
||
extends PsiReferenceBase<PsiElement> {
|
||
private boolean a;
|
||
|
||
public c(PsiElement psiElement, TextRange textRange, boolean bl, boolean bl2) {
|
||
super(psiElement, textRange, bl);
|
||
this.a = bl2;
|
||
}
|
||
|
||
@Nullable
|
||
public PsiElement resolve() {
|
||
Project project = this.myElement.getProject();
|
||
String string = this.a(project, this.myElement);
|
||
if (string == null) {
|
||
return null;
|
||
}
|
||
if (!this.a) {
|
||
Collection<Mapper> collection = v.a(this.myElement, project, string);
|
||
for (Mapper mapper : collection) {
|
||
for (ResultMap resultMap : mapper.getResultMaps()) {
|
||
String string2 = resultMap.getId().getStringValue();
|
||
if (string2 == null || !string2.equals(this.myElement.getText())) continue;
|
||
return resultMap.getId().getXmlAttributeValue();
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
Collection<Mapper> collection = v.b(project);
|
||
for (Mapper mapper : collection) {
|
||
List<ResultMap> list = mapper.getResultMaps();
|
||
String string3 = mapper.getNamespace().getStringValue();
|
||
for (ResultMap resultMap : list) {
|
||
String string4 = resultMap.getId().getStringValue();
|
||
String string5 = string3 + "." + string4;
|
||
if (!string5.equals(this.myElement.getText())) continue;
|
||
return resultMap.getId().getXmlAttributeValue();
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@NotNull
|
||
public Object[] getVariants() {
|
||
ArrayList arrayList;
|
||
block7: {
|
||
arrayList = Lists.newArrayList();
|
||
Project project = this.myElement.getProject();
|
||
String string = this.a(project, this.myElement);
|
||
if (string == null) break block7;
|
||
if (!this.a) {
|
||
for (Mapper mapper : v.b(project)) {
|
||
List<ResultMap> list = mapper.getResultMaps();
|
||
for (ResultMap resultMap : list) {
|
||
GenericAttributeValue genericAttributeValue = resultMap.getId();
|
||
String string2 = genericAttributeValue.getStringValue();
|
||
if (string2 == null) continue;
|
||
String string3 = mapper.getNamespace().getStringValue();
|
||
if (string3 != null && string3.equals(string)) {
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)LookupElementBuilder.create((String)genericAttributeValue.getStringValue()).withIcon(p.d()), (double)1.0));
|
||
continue;
|
||
}
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)LookupElementBuilder.create((String)(string3 + "." + genericAttributeValue.getStringValue())).withIcon(p.d()), (double)0.8));
|
||
}
|
||
}
|
||
} else {
|
||
String string4 = this.myElement.getText();
|
||
int n2 = string4.lastIndexOf(".");
|
||
String string5 = string4.substring(0, n2);
|
||
Collection<Mapper> collection = v.a(this.myElement, project, string5);
|
||
for (Mapper mapper : collection) {
|
||
List<ResultMap> list = mapper.getResultMaps();
|
||
for (ResultMap resultMap : list) {
|
||
GenericAttributeValue genericAttributeValue = resultMap.getId();
|
||
String string6 = genericAttributeValue.getStringValue();
|
||
if (string6 == null) continue;
|
||
arrayList.add(PrioritizedLookupElement.withPriority((LookupElement)LookupElementBuilder.create((String)genericAttributeValue.getStringValue()).withIcon(p.d()), (double)1.0));
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return arrayList.toArray(new LookupElement[0]);
|
||
}
|
||
|
||
private String a(Project project, PsiElement psiElement) {
|
||
PsiLanguageInjectionHost psiLanguageInjectionHost = InjectedLanguageManager.getInstance((Project)project).getInjectionHost(psiElement);
|
||
PsiFile psiFile = psiLanguageInjectionHost.getContainingFile();
|
||
if (psiFile instanceof XmlFile) {
|
||
String string = d_0.var_com_ccnode_codegenerator_ad_d_0_a.java_lang_String_a((XmlFile)psiFile);
|
||
return string;
|
||
}
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*/
|
||
package com.ccnode.codegenerator.O.e;
|
||
|
||
public class d {
|
||
}
|
||
|
||
/*
|
||
* Decompiled with CFR 0.152.
|
||
*
|
||
* Could not load the following classes:
|
||
* com.intellij.lexer.FlexLexer
|
||
* com.intellij.psi.TokenType
|
||
* com.intellij.psi.tree.IElementType
|
||
*/
|
||
package com.ccnode.codegenerator.O;
|
||
|
||
import com.ccnode.codegenerator.O.t;
|
||
import com.intellij.lexer.FlexLexer;
|
||
import com.intellij.psi.TokenType;
|
||
import com.intellij.psi.tree.IElementType;
|
||
import java.io.IOException;
|
||
import java.io.Reader;
|
||
import java.util.Stack;
|
||
|
||
public class v
|
||
implements FlexLexer {
|
||
public static final int var_int_a = -1;
|
||
private static final int var_int_c = 16384;
|
||
public static final int var_int_b = 0;
|
||
private static final int[] var_int_arr_a;
|
||
static final char[] var_char_arr_a;
|
||
static final char[] var_char_arr_b;
|
||
static final char[] var_char_arr_c;
|
||
private static final int[] var_int_arr_b;
|
||
private static final String var_java_lang_String_a = " |