本文整理汇总了Java中org.gsonformat.intellij.ConvertBridge类的典型用法代码示例。如果您正苦于以下问题:Java ConvertBridge类的具体用法?Java ConvertBridge怎么用?Java ConvertBridge使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConvertBridge类属于org.gsonformat.intellij包,在下文中一共展示了ConvertBridge类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FieldsDialog
import org.gsonformat.intellij.ConvertBridge; //导入依赖的package包/类
public FieldsDialog(ConvertBridge.Operator operator, ClassEntity classEntity,
PsiElementFactory factory, PsiClass psiClass, PsiClass aClass, PsiFile file, Project project
, String generateClassStr) {
this.operator = operator;
this.factory = factory;
this.aClass = aClass;
this.file = file;
this.project = project;
this.psiClass = psiClass;
this.generateClassStr = generateClassStr;
setContentPane(contentPane);
setTitle("Virgo Model");
getRootPane().setDefaultButton(buttonOK);
this.setAlwaysOnTop(true);
initListener(classEntity, generateClassStr);
}
示例2: onOK
import org.gsonformat.intellij.ConvertBridge; //导入依赖的package包/类
private void onOK() {
this.setAlwaysOnTop(false);
String jsonSTR = editTP.getText().trim();
if (TextUtils.isEmpty(jsonSTR)) {
return;
}
String generateClassName = generateClassTF.getText().replaceAll(" ", "").replaceAll(".java$", "");
if (TextUtils.isEmpty(generateClassName) || generateClassName.endsWith(".")) {
Toast.make(project, generateClassP, MessageType.ERROR, "the path is not allowed");
return;
}
PsiClass generateClass = null;
if (!currentClass.equals(generateClassName)) {
generateClass = PsiClassUtil.exist(file, generateClassTF.getText());
} else {
generateClass = cls;
}
new ConvertBridge(this, jsonSTR, file, project, generateClass,
cls, generateClassName).run();
}
示例3: showError
import org.gsonformat.intellij.ConvertBridge; //导入依赖的package包/类
@Override
public void showError(ConvertBridge.Error err) {
switch (err) {
case DATA_ERROR:
errorLB.setText("data err !!");
if (Config.getInstant().isToastError()) {
Toast.make(project, errorLB, MessageType.ERROR, "click to see details");
}
break;
case PARSE_ERROR:
errorLB.setText("parse err !!");
if (Config.getInstant().isToastError()) {
Toast.make(project, errorLB, MessageType.ERROR, "click to see details");
}
break;
case PATH_ERROR:
Toast.make(project, generateClassP, MessageType.ERROR, "the path is not allowed");
break;
}
}
示例4: showError
import org.gsonformat.intellij.ConvertBridge; //导入依赖的package包/类
@Override
public void showError(ConvertBridge.Error err) {
}