我正在使用eclipse霓虹灯版本。 我使用Eclipse Marketplace安装了JSON Editor插件。它安装成功。
我可以在“已安装的软件”列表中看到JSON编辑器插件的条目。 这是由Boothen Technology开发的。
但我仍然无法在编辑器列表中找到JSON编辑器。 它曾经在过去工作得很好。 我尝试过多次重新安装,但没有成功。
答案 0 :(得分:0)
由于日食工作区损坏,我的.plugins文件夹出现了问题。 这出现在以下位置
Random random = new Random();
// Enemy Base Stats
public static int enemyHP;
public static int enemyEP;
public static int enemyCoins;
// Enemy Attack
public static int enemyMelee = 0;
public static int enemyMagic = 0;
public static int enemyRange = 0;
// Enemy Defense
public static int enemyMeleeDefense = 0;
public static int enemyMagicDefense = 0;
public static int enemyRangeDefense = 0;
public void EnemySpawn()
{
string[] enemyGender = { "Male ", "Female " };
string[] enemyRace = { "Human ", "Elf ", "Dwarf ", "Gnome ", "Halfling ", "Half-Elf ", "Half-Orc " };
string[] enemyClass = { "Ranger", "Paladin", "Thief", "Mage", "Shaman", "Warlock", "Cleric", "Druid", "Monk", "Bard", "Mercenary", "Merchant" };
// Determines if class is Melee, Magic, Healer, or Clerk
int enemyClassChance = random.Next(1, 4);
if (enemyRace.ToString() == "Human ")
{
enemyHP += 100;
enemyEP += 80;
enemyCoins += 10;
enemyMelee += 5;
enemyMagic += 5;
enemyRange += 5;
enemyMeleeDefense += 6;
enemyMagicDefense += 5;
enemyRangeDefense += 6;
}
else if (enemyRace.ToString() == "Elf ")
{
enemyHP += 90;
enemyEP += 90;
enemyCoins += 10;
enemyMelee += 5;
enemyMagic += 9;
enemyRange += 8;
enemyMeleeDefense += 4;
enemyMagicDefense += 8;
enemyRangeDefense += 4;
}
else if (enemyRace.ToString() == "Dwarf ")
{
enemyHP += 125;
enemyEP += 100;
enemyCoins += 10;
enemyMelee += 8;
enemyMagic += 5;
enemyRange += 5;
enemyMeleeDefense += 8;
enemyMagicDefense += 3;
enemyRangeDefense += 4;
}
else if (enemyRace.ToString() == "Gnome ")
{
enemyHP += 95;
enemyEP += 80;
enemyCoins += 10;
enemyMelee += 4;
enemyMagic += 8;
enemyRange += 4;
enemyMeleeDefense += 2;
enemyMagicDefense += 6;
enemyRangeDefense += 5;
}
else if (enemyRace.ToString() == "Halfling ")
{
enemyHP += 80;
enemyEP += 75;
enemyCoins += 10;
enemyMelee += 3;
enemyMagic += 10;
enemyRange += 7;
enemyMeleeDefense += 1;
enemyMagicDefense += 9;
enemyRangeDefense += 4;
}
else if (enemyRace.ToString() == "Half-Elf ")
{
enemyHP += 95;
enemyEP += 80;
enemyCoins += 10;
enemyMelee += 2;
enemyMagic += 8;
enemyRange += 8;
enemyMeleeDefense += 5;
enemyMagicDefense += 8;
enemyRangeDefense += 2;
}
else if (enemyRace.ToString() == "Half-Orc ")
{
enemyHP += 150;
enemyEP += 125;
enemyCoins += 10;
enemyMelee += 10;
enemyMagic += 1;
enemyRange += 4;
enemyMeleeDefense += 10;
enemyMagicDefense += 1;
enemyRangeDefense += 5;
}
switch (enemyClassChance)
{
case 1:
Console.WriteLine(enemySpawnText[random.Next(0, enemySpawnText.Length)] + enemyGender[random.Next(0, enemyGender.Length)] +
enemyRace[random.Next(0, enemyRace.Length)] + enemyClassMelee[random.Next(0, enemyClassMelee.Length)] + ".");
break;
case 2:
Console.WriteLine(enemySpawnText[random.Next(0, enemySpawnText.Length)] + enemyGender[random.Next(0, enemyGender.Length)] +
enemyRace[random.Next(0, enemyRace.Length)] + enemyClassMagic[random.Next(0, enemyClassMagic.Length)] + ".");
break;
case 3:
Console.WriteLine(enemySpawnText[random.Next(0, enemySpawnText.Length)] + enemyGender[random.Next(0, enemyGender.Length)] +
enemyRace[random.Next(0, enemyRace.Length)] + enemyClassHealer[random.Next(0, enemyClassHealer.Length)] + ".");
break;
case 4:
Console.WriteLine(enemySpawnText[random.Next(0, enemySpawnText.Length)] + enemyGender[random.Next(0, enemyGender.Length)] +
enemyRace[random.Next(0, enemyRace.Length)] + enemyClassClerk[random.Next(0, enemyClassClerk.Length)] + ".");
break;
}
}
public void EnemyStats()
{
Console.WriteLine("##################### ");
Console.WriteLine("Enemy Statistics: ");
Console.WriteLine(" ");
Console.WriteLine("Melee: {0}", enemyMelee);
Console.WriteLine("Magic: {0}", enemyMagic);
Console.WriteLine("Range: {0}", enemyRange);
Console.WriteLine(" ");
Console.WriteLine("Melee Defense: {0}", enemyMeleeDefense);
Console.WriteLine("Magic Defense: {0}", enemyMagicDefense);
Console.WriteLine("Range Defense: {0}", enemyRangeDefense);
Console.WriteLine("##################### ");
Console.ReadLine();
}
}
关闭Eclipse。
删除.plugins文件夹中的内容。
重启Eclipse。
再次从工作区导入项目。
JSON编辑器映射到.json文件。
同样的事情也解决了.sh文件的问题。