代码拉取完成,页面将自动刷新
class WizardDialog : QDialog
{
XWorkspace _mdispace;
QTreeWidget _treeview;
QTreeWidget _listview;
QLineEdit projPath;
QLineEdit projName;
JsonObject jsonWizard;
ContextMenu _contextMenu = new ContextMenu();
QLabel projDescr, _proName, _proPath;
QPushButton btnOk, btnCancel, btnPathBro;
QWidget lblwidget;
QLabel add_exists;
Switche add_check = new Switche();
long example_root = 0;
long loadexample_item = 0;
String demo_url = nilptr;
long leftItem = 0;
Thread download_thread = nilptr;
public void enableContextMenu(bool b){
int [] indexs = {0};
_contextMenu.enableAction(indexs, b);
}
public onEventListener menuListener = new onEventListener()
{
void onTrigger(QObject obj) override {
if (obj == _contextMenu.actions[0]) {
long [] items = _listview.getSelectedItems();
if (items == nilptr || items.length != 1) {
QMessageBox.Critical("错误", "没有选择一个有效的模板.", QMessageBox.Ok, QMessageBox.Ok);
return ;
}
long selected_index = _listview.getItemTag(items[0], 0);
long typeitem = _listview.getItemTag(items[0], 1);
JsonArray selected_content;
try {
selected_content = actionMap.get(typeitem);
if (selected_content != nilptr) {
selected_content.remove(selected_index);
String confFile = "./config/project_navigation.conf";
try {
String projection = jsonWizard.toString(true);
if (projection.length() > 0) {
FileOutputStream foss = new FileOutputStream(confFile);
foss.write(projection.getBytes());
foss.close();
_listview.clear();
if (leftItem != 0) {
loadItem(leftItem);
} else {
loadAllItem();
}
}
} catch(Exception e) {
}
}
} catch(Exception e) {
}
return ;
}
}
};
bool selected_is_file = false;
Map<long, JsonArray> actionMap = new Map<long, JsonArray>();
public WizardDialog(XWorkspace _mdi)
{
_mdispace = _mdi;
}
public onTreeViewItemEvent listlistener = new onTreeViewItemEvent()
{
void onItemClicked(QTreeWidget,long item, int column)override {
_listview.clear();
if (loadexample_item == item && loadexample_item != 0) {
loadExamples();
return ;
}
loadItem(item);
projDescr.setText("");
leftItem = item;
}
};
public void loadItem(long item){
JsonArray content = nilptr;
try {
content = actionMap.get(item);
loadItemEx(item, content);
} catch(Exception e) {
}
}
public void loadItemEx(long item ,JsonArray content)
{
if (content != nilptr) {
bool canadd = false;
selected_is_file = false;
for (int i = 0, c = content.length(); i < c; i++) {
JsonObject objItem = (JsonObject)content.get(i);
if (objItem != nilptr){
if (objItem.has("ext")) {
canadd = true;
selected_is_file = true;
}
String iconFile = objItem.getString("icon");
if (objItem.has("url")) {
iconFile = "./res/toolbar/exz.png";
}
long citem = _listview.addItem(iconFile, objItem.getString("name"));
_listview.setItemTag(citem, 0, i);
_listview.setItemText(citem, 1, objItem.getString("platform"));
_listview.setItemTag(citem, 1, item);
_listview.setItemText(citem, 2, objItem.getString("language"));
}
}
add_check.setChecked(canadd, true);
add_check.setEnabled(canadd && (_mdispace.isCurrentProjectEmpty() == false));
}
}
public onTreeViewItemEvent devslistener = new onTreeViewItemEvent()
{
void onItemPressed(@NotNilptr QTreeWidget list, long item, int column)override {
long selected_index = list.getItemTag(item, 0);
long typeitem = list.getItemTag(item, 1);
try {
JsonArray typeobj = actionMap.get(typeitem);
if (typeobj != nilptr){
JsonObject objItem = (JsonObject)typeobj.get(selected_index);
if (objItem != nilptr){
if (objItem.has("default")) {
String defName = objItem.getString("default");
projName.setText(defName);
projName.setEnabled(false);
} else {
projName.setEnabled(true);
}
projDescr.setText(objItem.getString("details"));
String used = objItem.getString("user");
enableContextMenu(used != nilptr);
}
}
} catch(Exception e) {
}
}
};
public String getMd5String(@NotNilptr String url)
{
long md5 = Crypto.Md5Init();
byte [] data = url.getBytes();
Crypto.Md5Update(md5,data,0,data.length);
Crypto.MD5Final(md5);
byte [] dis = Crypto.MD5Get(md5);
Crypto.MD5Close(md5);
String out = "";
for (int i =0; i < dis.length; i ++) {
out = out + String.format("%02X",dis[i]);
}
return out;
}
public bool loadLocalExample(bool bStartup)
{
String cacheFile = String.formatPath(XPlatform.getAppDirectory().appendPath("examples").appendPath("project.list"), false);
if (XPlatform.existsSystemFile(cacheFile)) {
_treeview.removeAllchild(example_root);
try {
FileInputStream fis = new FileInputStream(cacheFile);
byte [] jdata = fis.read();
String jcontent = new String(jdata);
parseExample(jcontent);
} catch(Exception e) {
}
loadexample_item = _treeview.insertItem(example_root,"./res/toolbar/refresh.png","点击刷新");
_treeview.setItemColor(loadexample_item,0,0xff007aff);
return true;
} else if (bStartup == false) {
_treeview.setItemText(loadexample_item,0,"加载失败,点击重试");
} else {
_treeview.setItemText(loadexample_item,0,"点击加载");
}
return false;
}
public void loadExamples()
{
String dmu = demo_url;
if (dmu == nilptr){
return;
}
String strmd5 = getMd5String(dmu);
String cacheFile = String.formatPath(XPlatform.getAppDirectory().appendPath("examples").appendPath("project.list"), false);
synchronized(WizardDialog.this) {
if (download_thread == nilptr) {
_treeview.setItemText(loadexample_item,0,"加载中...");
download_thread = new Thread() {
void run()override {
getOnlineExample(cacheFile);
synchronized(WizardDialog.this) {
download_thread = nilptr;
}
runOnUi(new Runnable() {
void run()override {
_treeview.setItemText(loadexample_item,0,"点击刷新...");
projDescr.setText("完毕");
}
});
}
};
projDescr.setText("正在加载... " + dmu);
download_thread.start();
}
}
}
public bool onClose()override
{
//等待线程退出之后才能关闭 ,否则QT底层会销毁窗口 线程再次访问时导致错误
if (download_thread != nilptr) {
QMessageBox.Critical("程序忙","程序正忙,请稍候.",QMessageBox.Ok,QMessageBox.Ok);
}
return download_thread == nilptr;
}
public bool parseExample(String content)
{
try {
JsonObject onlineDemo = new JsonObject(content);
_treeview.removeAllchild(example_root);
loadProject(example_root, onlineDemo, "./res/toolbar/exz.png");
_treeview.setExpand(example_root, true);
return true;
} catch(Exception e) {
}
return false;
}
public void getOnlineExample(@NotNilptr String cacheFile)
{
HttpRequest req = new HttpRequest();
if (req.get(demo_url, 100000, true)) {
byte [] data = new byte[1024];
String content = "";
if (req.getResponseCode() >= 200) {
while (req.available(true) > 0) {
int len = req.readData(data, 0, 1024);
String _txt = new String(data, 0, len);
content = content + _txt;
}
FileOutputStream fos ;
try {
fos = new FileOutputStream(cacheFile);
byte [] jdata = content.getBytes();
fos.write(jdata, 0, jdata.length);
} catch(Exception e) {
} finally{
if (fos != nilptr)
{
fos.close();
}
}
runOnUi(new Runnable() {
void run()override {
if (false == loadLocalExample(false)) {
QMessageBox.Critical("加载失败","加载在线示例失败,请重试,数据错误.",QMessageBox.Ok,QMessageBox.Ok);
}
}
});
} else {
runOnUi(new Runnable() {
void run()override {
QMessageBox.Critical("加载失败","加载在线示例失败,请重试,错误代码:" + req.getResponseCode(),QMessageBox.Ok,QMessageBox.Ok);
}
});
}
} else {
runOnUi(new Runnable() {
void run()override {
QMessageBox.Critical("加载失败","加载在线示例失败,请重试,网络错误.",QMessageBox.Ok,QMessageBox.Ok);
}
});
}
}
public void onAttach()
{
_treeview = (QTreeWidget)attachByName(new QTreeWidget(), "projType");
_listview = (QTreeWidget)attachByName(new QTreeWidget(), "projContent");
projName = (QLineEdit)attachByName(new QLineEdit(), "projName");
projPath = (QLineEdit)attachByName(new QLineEdit(), "projPath");
btnOk = (QPushButton)attachByName(new QPushButton(), "btnOk");
btnCancel = (QPushButton)attachByName(new QPushButton(), "btnCancel");
btnPathBro = (QPushButton)attachByName(new QPushButton(), "btnPathBro");
projDescr = (QLabel)attachByName(new QLabel(), "projDescr");
_proName = (QLabel)attachByName(new QLabel(), "_proName");
_proPath = (QLabel)attachByName(new QLabel(), "_proPath");
lblwidget = (QWidget)attachByName(new QWidget(), "lblwidget");
add_exists = (QLabel)attachByName(new QLabel(), "addExists");
add_check.create(this);
add_check.resize(36, 26);
add_check.show();
add_check.setWhatsThis("将新建的项添加到当前已载入的项目中");
String defaultPath = Setting.get("workspace");
setWindowIcon("./res/toolbar/newproj.png");
bool hasProject = _mdispace.isCurrentProjectEmpty() == false;
add_check.setEnabled(hasProject);
add_check.setChecked(hasProject, true);
add_check.setOnSwitchListener(new Switche.OnSwitchListener() {
void onSwitch(Switche view,bool checked) {
if (checked) {
projPath.setText(_mdispace.currentProjectDir());
} else if (defaultPath == nilptr) {
projPath.setText("");
//projName.setEnabled(true);
} else {
projPath.setText(defaultPath);
}
}
});
/*add_check.setOnClickListener(
new onClickListener(){
void onClick(QObject obj, bool checked)override{
}
});*/
btnOk.setOnClickListener(
new onClickListener() {
void onClick(QObject obj, bool checked)override {
WizardDialog.this.onCreateProjectItem();
}
});
btnCancel.setOnClickListener(
new onClickListener() {
void onClick(QObject obj, bool checked)override {
WizardDialog.this.close();
}
});
btnPathBro.setOnClickListener(
new onClickListener() {
void onClick(QObject obj, bool checked)override {
String path = QFileDialog.getFolderPath("选择工作目录", nilptr, nilptr, WizardDialog.this);
if (path != nilptr && path.length() > 0) {
projPath.setText(path);
Setting.setSetting("workspace", path);
Setting.save();
}
}
});
_treeview.setOnTreeViewItemEvent(listlistener);
_listview.setOnTreeViewItemEvent(devslistener);
setOnLayoutEventListener(new onLayoutEventListener() {
void onResize(QObject obj, int w, int h, int oldw, int oldh)override {
WizardDialog.this.onResize(w, h, oldw, oldh);
}
});
if (hasProject) {
projPath.setText(_mdispace.currentProjectDir());
} else if (defaultPath != nilptr) {
projPath.setText(defaultPath);
}
String [] columns = {"项目", "平台", "语言"};
_listview.setColumns(columns);
_listview.setColumnWidth(0, 200);
_listview.setColumnWidth(1, 300);
_listview.setColumnWidth(2, 50);
loadWizard();
setWindowTitle("创建项目");
setModal(true);
show();
createContextMenu();
}
public void createContextMenu()
{
String []acts = {"删除模板"};
__nilptr_safe(_listview);
_contextMenu.create(_listview, acts, menuListener, nilptr);
}
public void onCreateProjectItem()
{
String project_name = projName.getText();
String project_path = projPath.getText();
bool addition = add_check.getChecked();
long [] items = _listview.getSelectedItems();
if (items == nilptr || items.length != 1) {
QMessageBox.Critical("错误", "没有选择一个新建项目的模板.", QMessageBox.Ok, QMessageBox.Ok);
/*QPoint cpt = _listview.mapToGlobal(0,0);
_listview.showToolTips(cpt.x,cpt.y,"没有选择一个新建项目的模板",-1);*/
return ;
}
long selected_index = _listview.getItemTag(items[0], 0);
long typeitem = _listview.getItemTag(items[0], 1);
JsonArray selected_content;
try {
selected_content = actionMap.get(typeitem);
} catch(Exception e) {
}
if (project_name.length() == 0) {
//QMessageBox.Critical("错误", "未填写项目名称", QMessageBox.Ok, QMessageBox.Ok);
QPoint cpt = projName.mapToGlobal(0,0);
projName.showToolTips(cpt.x,cpt.y,"未填写项目名称",-1);
return ;
}
if (project_path.length() == 0) {
//QMessageBox.Critical("错误", "未选择项目路径", QMessageBox.Ok, QMessageBox.Ok);
QPoint cpt = projPath.mapToGlobal(0,0);
projPath.showToolTips(cpt.x,cpt.y,"未选择项目路径",-1);
return ;
}
if (selected_content == nilptr) {
//QMessageBox.Critical("错误", "没有选择一个新建项目的类型.", QMessageBox.Ok, QMessageBox.Ok);
QPoint cpt = _treeview.mapToGlobal(0,0);
_treeview.showToolTips(cpt.x,cpt.y,"没有选择一个新建项目的类型",-1);
return ;
}
if (selected_index < 0 || selected_index >= selected_content.length()) {
QPoint cpt = _listview.mapToGlobal(0,0);
_listview.showToolTips(cpt.x,cpt.y,"没有选择一个新建项目的模板",-1);
//QMessageBox.Critical("错误", "没有选择一个新建项目的模板.", QMessageBox.Ok, QMessageBox.Ok);
return ;
}
JsonObject objItem = (JsonObject)selected_content.get(selected_index);
if (objItem != nilptr){
String uuid = objItem.getString("uuid");
IProjectPlugin plugin ;
if (objItem.has("plugin")) {
int pid = objItem.getInt("plugin");
if (pid >= 0 && pid < __proj_plugins.size()){
plugin = __proj_plugins.get(pid);
}
}
ProjectPropInterface _propinterface = nilptr;
if (addition ){
Project curprj = _mdispace.getCurrentProject();
if (curprj != nilptr){
_propinterface = curprj.getPropInterface();
}
}
String language = objItem.getString("language");
if (_propinterface == nilptr){
_propinterface = ProjectPropManager.getForProject(language);
}
if (_propinterface != nilptr) {
if (objItem.has("url")) {
String turl = objItem.getString("url");
if (turl != nilptr){
downloadProject(_propinterface, project_name, turl);
}
return ;
}
}
String type = objItem.getString("user");
WizardLoader loader = new WizardLoader() {
IProject loadProject(@NotNilptr String file) {
return _mdispace.loadProject(file);
}
void openTextFile(@NotNilptr String file) {
_mdispace.openTextFile(file);
}
};
bool ret = false;
if (_propinterface != nilptr || plugin != nilptr){
if (_propinterface != nilptr){
ret = _propinterface.create(loader,project_name, project_path, uuid, _mdispace.getCurrentProject(), addition, type);
}
if (ret == false && plugin != nilptr){
ret = plugin.createProject(loader,project_name,project_path,uuid,_mdispace.getCurrentProject(), addition);
}
}else
{
QMessageBox.Critical("错误", "没有找到为该类型项目注册的插件:" + language, QMessageBox.Ok, QMessageBox.Ok);
return;
}
if (ret)
{
close();
} else {
QMessageBox.Critical("错误", "无法建立项目", QMessageBox.Ok, QMessageBox.Ok);
return ;
}
}
}
public void downloadProject(@NotNilptr ProjectPropInterface _propinterface,@NotNilptr String defaultName,@NotNilptr String url)
{
String localPath = String.formatPath(XPlatform.getAppDirectory().appendPath("examples").appendPath(defaultName + ".zip"), false);
if (XPlatform.existsSystemFile(localPath)) {
if (QMessageBox.No == QMessageBox.Question("提示","该示例代码已在本地磁盘存在,是否重新下载?",QMessageBox.Yes | QMessageBox.No,QMessageBox.No)) {
loadProject(_propinterface, defaultName, localPath);
return ;
}
}
synchronized(WizardDialog.this) {
if (download_thread == nilptr) {
ProgressView pv = ProgressView.showWait(this, -1);
if (pv == nilptr){
return ;
}
pv.centerScreen();
pv.setTitleText("正在下载...");
download_thread = new Thread() {
void run()override {
String localUrl = loadOnlineProject(pv, localPath, url);
synchronized(WizardDialog.this) {
download_thread = nilptr;
}
pv.showResult(true, localUrl != nilptr);
pv.setTitleText(localUrl != nilptr ? "下载完成" : "下载失败");
if (localUrl != nilptr){
pv.setOnDismissListener(new ProgressView.OnDismissListener() {
void onDismissListener(ProgressView v)override {
runOnUi(new Runnable() {
void run()override {
if (QMessageBox.Yes == QMessageBox.Question("提示","下载已完成,是否载入此代码示例?",QMessageBox.Yes | QMessageBox.No,QMessageBox.Yes)) {
loadProject(_propinterface, defaultName, localUrl);
}
}
});
}
});
}
pv.dismissAfter(1000);
runOnUi(new Runnable() {
void run()override {
projDescr.setText("完毕");
}
});
}
};
projDescr.setText("正在获取... " + url);
download_thread.start();
}
}
}
public String loadOnlineProject(@NotNilptr ProgressView pv,@NotNilptr String localPath, String url)
{
HttpRequest req = new HttpRequest();
if (req.get(url, 100000, true)) {
byte [] data = new byte[1024];
String content = "";
FileOutputStream fos = nilptr;
try {
fos = new FileOutputStream(localPath);
if (req.getResponseCode() >= 200) {
long length = req.getLength();
long dlsize = 0;
if (length > 0) {
pv.EnableProgress(true, 0);
}
while (req.available(true) > 0) {
int len = req.readData(data, 0, 1024);
dlsize += length;
if (length > 0) {
pv.setProgress(dlsize / length);
}
fos.write(data, 0, len);
}
pv.setProgress(100);
}
return localPath;
} catch(Exception e) {
} finally{
if (fos != nilptr)
{
fos.close();
}
}
}
return nilptr;
}
public void loadProject(@NotNilptr ProjectPropInterface _propinterface,String defaultName, @NotNilptr String project_path)
{
if (defaultName == nilptr){
return ;
}
String project_dir = projPath.getText();
if (_propinterface.create(new WizardLoader() {
IProject loadProject(@NotNilptr String file) {
return _mdispace.loadProject(file);
}
void openTextFile(@NotNilptr String file) {
_mdispace.openTextFile(file);
}
},defaultName, project_dir, project_path, nilptr, false, "example")) {
close();
} else {
QMessageBox.Critical("错误", "无法建立项目", QMessageBox.Ok, QMessageBox.Ok);
return ;
}
}
public void onResize(int w, int h, int oldw, int oldh)
{
_listview.resize(w - 272, h - 173);
_treeview.resize(269, h - 113);
lblwidget.move(270, h - 174);
lblwidget.resize(w - 272, 61);
projDescr.resize(w - 272, 61);
_proName.move(30, h - 84);
projName.move(100, h - 89);
projName.resize(w - 332, 21);
_proPath.move(30, h - 48);
projPath.move(100, h - 53);
projPath.resize(w - 362, 21);
btnPathBro.move(w - 262, h - 54);
btnOk.move(w - 193, h - 62);
btnCancel.move(w - 103, h - 62);
add_exists.move(w - 150, h - 96);
add_check.move(w - 190, h - 99);
}
public void loadWizard()
{
actionMap.clear();
jsonWizard = nilptr;
String confFile = "./config/project_navigation.conf";
byte []data ;
try {
FileInputStream fis = new FileInputStream(confFile);
data = fis.read();
parseWizard(new String(data));
loadAllItem();
} catch(Exception e) {
QMessageBox.Critical("注意", "无法加载模板", QMessageBox.Ok, QMessageBox.Ok);
close();
}
}
public void loadAllItem()
{
_listview.clear();
Map.Iterator<long, JsonArray> iterator = actionMap.iterator();
while (iterator.hasNext()) {
loadItem(iterator.getKey());
iterator.next();
}
}
public void parseWizard(String txt)
{
bool hasExistProject = !_mdispace.isCurrentProjectEmpty();
try {
jsonWizard = new JsonObject(txt);
JsonObject root = (JsonObject)jsonWizard.get("Navigation");
if (root != nilptr ){
if (hasExistProject == false) {
long itemprj = _treeview.addItem(nilptr, "项目");
loadProject(itemprj, root.get("project"), "./res/toolbar/projc.png");
_treeview.setExpand(itemprj, true);
demo_url = root.getString("example_url");
if (demo_url != nilptr && demo_url.length() > 0) {
example_root = _treeview.addItem(nilptr, "代码示例");
loadexample_item = _treeview.insertItem(example_root,"./res/toolbar/refresh.png","点击刷新");
_treeview.setItemColor(loadexample_item,0,0xff0000ff);
loadLocalExample(true);
}
} else {
long itemfile = _treeview.addItem(nilptr, "文件");
loadProject(itemfile, root.get("file"), "./res/toolbar/files.png");
_treeview.setExpand(itemfile, true);
}
}
loadPlugins();
} catch(Exception e) {
/*_system_.consoleWrite("exception ");*/
}
}
public long addItem(long item, String icon, String name){
long [] items;
if (item == 0){
items = _treeview.getTopItems();
}else{
items = _treeview.getItemChildren(item);
}
if (items != nilptr){
for (int i =0 ;i < items.length; i++){
String lab = _treeview.getItemText(items[i], 0);
if (lab.equals(name)){
return items[i];
}
}
}
if (item != 0){
return _treeview.insertItem(item, icon, name);
}
return _treeview.addItem(icon, name);
}
Vector<IProjectPlugin> __proj_plugins = new Vector<IProjectPlugin>();
public void loadPlugins(){
__proj_plugins.clear();
List<IProjectPlugin> plugins = PluginsController.getProjectPluginList();
if (plugins != nilptr){
List.Iterator<IProjectPlugin> iter = plugins.iterator();
int id = 0;
while (iter.hasNext()){
IProjectPlugin plugin = iter.next();
__proj_plugins.add(plugin);
loadPluginProject(plugin, id);
id++;
}
}
}
public void loadPluginProject(IProjectPlugin plugin, int id){
if (plugin != nilptr){
bool hasExistProject = !_mdispace.isCurrentProjectEmpty();
String txt = plugin.getWizard(hasExistProject);
try {
jsonWizard = new JsonObject(txt);
JsonObject root = (JsonObject)jsonWizard.get("Navigation");
if (root != nilptr){
if (hasExistProject == false) {
long itemprj = addItem(0, nilptr, "项目");
loadProjectPlugin(itemprj, root.get("project"), "./res/toolbar/projc.png", id);
_treeview.setExpand(itemprj, true);
} else {
long itemfile = addItem(0, nilptr, "文件");
loadProjectPlugin(itemfile, root.get("file"), "./res/toolbar/files.png", id);
_treeview.setExpand(itemfile, true);
}
}
} catch(Exception e) {
/*_system_.consoleWrite("exception ");*/
}
}
}
public void markId(JsonArray minor, int id){
if (minor != nilptr){
for (int i = 0, c = minor.length() ; i < c; i++){
JsonNode ji = minor.get(i);
if (ji != nilptr){
if (ji.isArray()){
return;
}else{
((JsonObject)ji).put("plugin", id);
}
}
}
}
}
public void MegerArray(JsonArray major, JsonArray minor, int id){
if (major != nilptr && minor != nilptr){
for (int i = 0 , c = minor.length(); i < c; i++){
JsonNode ji = minor.get(i);
if (ji != nilptr){
if (ji.isArray()){
return;
}else{
((JsonObject)ji).put("plugin", id);
major.put(ji);
}
}
}
}
}
public void loadProjectPlugin(long root,JsonNode projectRoot, String icon, int pluginId)
{
if (projectRoot == nilptr){
return;
}
JsonNode child = projectRoot.child();
while (child != nilptr) {
String name = child.getName();
long item ;
if (child.isArray()) {
item = addItem(root, icon, name);
try{
JsonArray pchild = actionMap.get(item);
MegerArray(pchild, (JsonArray)child, pluginId);
}catch(Exception e){
markId((JsonArray)child, pluginId);
actionMap.put(item, (JsonArray)child);/*.clone()*/
}
loadItemEx(item, (JsonArray)child);
} else {
item = _treeview.insertItem(root, icon, name);
loadProject(item, child, icon);
}
child = child.next();
}
}
public void loadProject(long root,JsonNode projectRoot, String icon)
{
if (projectRoot != nilptr){
JsonNode child = projectRoot.child();
while (child != nilptr) {
String name = child.getName();
long item = _treeview.insertItem(root, icon, name);
if (child.isArray()) {
actionMap.put(item, (JsonArray)child);/*.clone()*/
} else {
loadProject(item, child, icon);
}
child = child.next();
}
}
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。